Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to return to setting of the system display colors?
Message
 
 
To
25/07/2002 17:19:15
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00682779
Message ID:
00682826
Views:
19
>How can I know what's the current number of colors allowed by the display adapter?

You can retrieve the number of color bits that a particular display uses by calling the GetDeviceCaps function, specifying BITSPIXEL as the second argument.
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
lnHDC = GetDC(0)
cnBitsPixel = 12
lnBitsPixel = GetDeviceCaps(lnHDC, cnBitsPixel )
= ReleaseDC(0, lnHDC )
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform