Announcement

Collapse
No announcement yet.

Big fonts and file operation on Windows NT

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Big fonts and file operation on Windows NT

    Hello.
    I have got 2 questions.

    1. How can I see whether a user has choosen big fonts for his
    screen configuration.
    2. Although my app generally works under Windows NT/2000 it
    doesn't allow any file operations like OPEN or MKDIR.
    Whats wrong ???

    Thanks..Michael


    ------------------

  • #2
    On (2), the most likely guess is that you're running on an NT account that doesn't have file read/write privileges on the drive you're using. Don't forget to check the ERR and ERRAPI results after the OPEN or MKDIR operations to see what they indicate.

    ------------------
    Tom Hanlin
    PowerBASIC Staff

    Comment


    • #3
      Michael;

      When you calculate the size for a Font you can convert a
      "point" size into the Height value (first parameter) for the
      CreateFont API function and also check the system for the
      Systemwide Font setting (small fonts/large fonts) in the
      calculation using the code below :

      Code:
      ' -----------------------------
      ' PointSize&   -   is the Point size of the font
      ' SF&    -   System wide font size factor
      ' -----------------------------
      hDC = GetDC(%HWND_DESKTOP)
      SF&=GetDeviceCaps(hDC, %LOGPIXELSY)
      ReleaseDC %HWND_DESKTOP, hDC
      ' -----------------------------
      ' FHeight& will be used as first paramter (height)
      ' in the CreateFont API function
      FHeight&=-MulDiv(PointSize&, SF&, 72)
      The code above is the "official" Microsoft suggested method
      for calculating a Fonts height. This will allow your fonts to
      autoscale based on the end users font setting (small/large fonts).



      ------------------
      Chris Boss
      Computer Workshop
      Developer of "EZGUI"
      http://cwsof.com
      http://twitter.com/EZGUIProGuy

      Comment

      Working...
      X