Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detectar a definição de cores do Windows
Message
 
À
30/08/2002 22:23:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00695606
Message ID:
00695649
Vues:
8
Peguei este código na message#471810
Procedure Color256
*-- Check whether device can display only 256 colors.
DECLARE INTEGER GetActiveWindow IN Win32API
lnHwnd = GetActiveWindow()
DECLARE INTEGER GetDCEx IN User32.dll INTEGER, INTEGER, INTEGER
lnFour = GetDCEx(lnHwnd, 0, 0)
DECLARE INTEGER GetDeviceCaps IN Gdi32.dll INTEGER, INTEGER
#DEFINE NUMCOLORS 24
#DEFINE COLORRES 108
lnNumColors = GetDeviceCaps(@lnFour, NUMCOLORS)
lnResColors = GetDeviceCaps(@lnFour, COLORRES)
*
*--The next returns .T. if 256 colors are set, otherwise .F. for 16 bit or 32 bit.
RETURN lnNumColors + lnResColors > 0
ENDPROC
Talvez resolva... :-)

[]s!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rodolfo Duarte
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform