Created
November 4, 2013 16:17
-
-
Save davidglezz/7305041 to your computer and use it in GitHub Desktop.
Get the number of color bits in the current screen device.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int GetColorsBits() | |
{ | |
HDC hScreenDC = GetDC(0); | |
int nColorBits = GetDeviceCaps(hScreenDC, BITSPIXEL) * GetDeviceCaps(hScreenDC, PLANES); | |
ReleaseDC(NULL, hScreenDC); | |
return nColorBits; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment