🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #1679

How get font information on a dialog box control?

#1679
From: Dag Wahlberg
Date: Sat, 19 Dec 1992 19:36
23 lines
1440 bytes
 I have created a (modeless) dialog box, defined at compile-time using
"Dialog Editor", included in the MS QuickC/Win package.  The dialog box
contains a text field control (LTEXT) for displaying text.

 At run-time I need to know the width and height of the characters to
display in this text field but I can't get hold of the right
information. GetTextMetrics() returns the _same_ data regardless of the
font (specified w "Dialog Editor") I use. Why?
 GetDialogBaseUnits() does not return any useful information either, I
have received the same size (20x10) on all the fonts (System,
Courier,..)  I have tried. I calculated the different fonts to be 16x10,
20x8, etc on a certain device.

 Wrong functions? Any ideas?

 I use QC/Win 1.0, Win 3.1. 

/Dag

--
===Dag Wahlberg (dagwag@csd.uu.se)  Uppsala University		     ===
===Phone:	+46 18-18 10 17     Computing Science Department     ===
===Fax:		+46 18-52 12 70	    Box 311, S-751 05 UPPSALA, Sweden===
Technical Details
Message-ID: <dagwag.724793817@meryl>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!corax.udac.uu.se!meryl.csd.uu.se!dagwag

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!corax.udac.uu.se!meryl.csd.uu.se!dagwag
From: dagwag@meryl.csd.uu.se (Dag Wahlberg)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: How get font information on a dialog box control?
Date: 19 Dec 92 19:36:57 GMT
Organization: CSD, Uppsala University
Lines: 23
Message-ID: <dagwag.724793817@meryl>
Reply-To: dagwag@meryl.csd.uu.se
NNTP-Posting-Host: meryl.csd.uu.se
Keywords: QuickC, Dialog Box Control, Font