Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Monitor info
Message
De
21/05/1999 08:06:39
 
 
À
21/05/1999 05:51:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00221260
Message ID:
00221300
Vues:
13
I've seen this question many times here. Maybe you can add it as a new FAQ... if you have time. Thanks.

Vlad

>You need several API calls:
>
>
DECLARE INTEGER GetDC IN WIN32API INTEGER hWnd
>DECLARE INTEGER GetActiveWindow IN WIN32API
>DECLARE INTEGER GetDeviceCaps IN WIN32API ;
>   INTEGER hDC, ;
>   INTEGER nIndex
>DECLARE INTEGER ReleaseDC IN WIN32API INTEGER hDC
>#DEFINE BITSPIXEL 12
>LOCAL nDC, nBitsPerPixel
>nDC = GetDC(GetActiveWindow())
>nBitsPerPixel = GetDeviceCaps(nDC, BITSPIXEL)
>=ReleaseDC(nDC)
>
>nBitsPerPixel returns the color depth; 8 = 256 Color, 16 = High Color (64K), 24 or 32 are TrueColor modes. There are other values; these are the most common ones encountered.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform