Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find what font size windows is using
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00661199
Message ID:
00662707
Views:
30
OK Thanks

>>Hi All,
>>
>>I need to find out the font size in Windows Like it could be either Large Size 120 DPI or Normal Size 96 DPI.
>
>
DECLARE Long ReleaseDC IN WIN32API Long HWND, Long HDC
>DECLARE Long GetDC IN WIN32API Long HWND
>DECLARE Long GetDeviceCaps IN WIN32API Long HDC, Long nIndex
>nHDC = GetDC(0)
>cnLOGPIXELSX = 88
>*cnLOGPIXELSY = 90
>lnLogPixX = GetDeviceCaps(lnHDC, cnLOGPIXELSX )
>*lnLogPixY = GetDeviceCaps(lnHDC, cnLOGPIXELSY )
>= ReleaseDC(0, lnHDC )
>DO CASE
>CASE lnLogPixX < 96
>  lcReturn ="Windows is using smaller than Small Fonts"
>CASE lnLogPixX = 96
>  lcReturn ="Windows is using Small Fonts"
>CASE lnLogPixX < 120
>  lcReturn ="Windows is using between Small Fonts and Large Fonts"
>CASE lnLogPixX = 120
>  lcReturn ="Windows is using Large Fonts"
>OTHERWISE
>  lcReturn = "Windows is using larger than Large Fonts"
>ENDCASE
>? lcReturn
>
>The code is based on mskb #Q137556.
Previous
Reply
Map
View

Click here to load this message in the networking platform