` Get font size resolution (Larry Sand) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Windows API: Get font size resolution
2003-04-29 -- Larry Sand
 
Newsgroups: comp.lang.clarion Michael D. Brooks wrote: | Can anyone recomment the best call to use to determine the screen resolution | and font size use? | | I need to get this information for automatic window sizing. | Michael, GetDeviceCaps() for the screen resolution and something like: myhDC = GetDC(0) PrevMapMode = SetMapMode(myhDC, MM_TEXT) GetTextMetrics(myhDC, tm) PrevMapMode = SetMapMode(myhDC, PrevMapMode) ! tm is a text metric structure, ! tm.tmHeight is the size of the desktop windows font in pixels ReleaseDC(0,MyhDC) for the font size. Cheers, Larry Sand


Today is April 26, 2024, 7:57 pm
This article has been viewed 35108 times.
Google search has resulted in 32 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: