home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / mswindo / programm / misc / 4385 next >
Encoding:
Internet Message Format  |  1992-12-21  |  1.4 KB

  1. Path: sparky!uunet!mcsun!sunic!corax.udac.uu.se!meryl.csd.uu.se!dagwag
  2. From: dagwag@meryl.csd.uu.se (Dag Wahlberg)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: How get font information on a dialog box control?
  5. Date: 19 Dec 92 19:36:57 GMT
  6. Organization: CSD, Uppsala University
  7. Lines: 23
  8. Message-ID: <dagwag.724793817@meryl>
  9. Reply-To: dagwag@meryl.csd.uu.se
  10. NNTP-Posting-Host: meryl.csd.uu.se
  11. Keywords: QuickC, Dialog Box Control, Font
  12.  
  13.  I have created a (modeless) dialog box, defined at compile-time using
  14. "Dialog Editor", included in the MS QuickC/Win package.  The dialog box
  15. contains a text field control (LTEXT) for displaying text.
  16.  
  17.  At run-time I need to know the width and height of the characters to
  18. display in this text field but I can't get hold of the right
  19. information. GetTextMetrics() returns the _same_ data regardless of the
  20. font (specified w "Dialog Editor") I use. Why?
  21.  GetDialogBaseUnits() does not return any useful information either, I
  22. have received the same size (20x10) on all the fonts (System,
  23. Courier,..)  I have tried. I calculated the different fonts to be 16x10,
  24. 20x8, etc on a certain device.
  25.  
  26.  Wrong functions? Any ideas?
  27.  
  28.  I use QC/Win 1.0, Win 3.1. 
  29.  
  30. /Dag
  31.  
  32. --
  33. ===Dag Wahlberg (dagwag@csd.uu.se)  Uppsala University             ===
  34. ===Phone:    +46 18-18 10 17     Computing Science Department     ===
  35. ===Fax:        +46 18-52 12 70        Box 311, S-751 05 UPPSALA, Sweden===
  36.