Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find what font size windows is using
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00661199
Message ID:
00661278
Vues:
25
>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.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform