Thread: Problem with default font in graphical mode

  1. #16
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Of course it would be a waste of time to complain to faculty.

    Similarly, messing with the properties of "cmd" seems flawed (assuming you got the terminology right) since that's a 32-bit program. What you really want to change are the properties of NTVDM, as it applies to the particular 16-bit program you're trying to run (I've no idea, I lost interest in the details long ago).

    Right-clicking on your Turbo C IDE icon might get you there.

    Finding a machine which "does it right", and searching the registry for entries which may indicate how Turbo C is run (and comparing them with the same entries on your machine) again may offer clues.

    > int gDriver=3,gMode=1; //650x350
    > initgraph(&gDriver,&gMode,"");
    Mmm - what does your manual say?
    pathtodriver specifies the directory path where initgraph looks for graphics drivers. initgraph first looks in the path specified in pathtodriver, then (if they are not there) in the current directory. Accordingly, if pathtodriver is null, the driver files (*.BGI) must be in the current directory. This is also the path settextstyle searches for the stroked character font files (*.CHR).
    Are they?

    Further, are they in a directory structure which conforms to 8.3 notation all the way to the files?

    What about checking whether the driver was successfully loaded, rather than assuming all is well?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  2. #17
    Registered User
    Join Date
    Oct 2008
    Posts
    10
    I`m sure problem problem isn`t in Turbo C IDE

    You can assume test program looks like that small part of code posted here (libraries not included). So it`s all about printing "1" with default font and size in upper left corner of the screen.
    Driver file EGAVGA.BGI is in the same directory as executable and it is being loaded correctly, just checked. Problem is in with default font, which is not defined in CHR file, with all other fonts there are no problems. So, I suppose program is using VGA OEM Hardware Font.

    Is there something I could change for NTVDM? (forget about Turbo C, now talking about already built test software) Didn`t see anything special to change under right-click -> properities.

    Where should I look in registry?
    At school (school`s machines does it right) teacher suggested to check 2 registry entries. I remember only one:
    HKEY_LOCAL_MACHINE -> SYSTEM -> CurrentControlSet -> Control -> Nls

    As much as i compared they were identical. I didn`t compare all, cause MUILanguages has a lots of subentries.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Default Button Problem
    By Dark Dude in forum Windows Programming
    Replies: 5
    Last Post: 12-25-2008, 08:06 PM
  2. default font
    By larry in forum Windows Programming
    Replies: 2
    Last Post: 02-13-2003, 05:22 AM
  3. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM
  4. setting default font to draw all further controls with
    By alandrums in forum Windows Programming
    Replies: 0
    Last Post: 12-03-2001, 10:31 PM
  5. problem going into mode 13h
    By ArseMan in forum C++ Programming
    Replies: 5
    Last Post: 08-31-2001, 04:53 PM