* Exibe a quantidade de cores configurada no windows:
** GetBitsPixel () -> nBitsPorPixel
** Return value of bits in pixel.
** Value of color is 2
** nBitsPixel (ex.: 8 bits = 256 colors, 16 = 65536, ...)
**--------------------------------------------------------------------------
? GetBitsPixel() && Para chamar
FUNCTION GetBitsPixel
LOCAL nBitsPixel, hSrcDC,
hWnd
DECLARE Integer GetDesktopWindow
in
User32
DECLARE Integer GetDC
in
User32
Integer
DECLARE Integer GetDeviceCaps
in
Gdi32
Integer,
Integer
DECLARE Integer ReleaseDC
in
User32
Integer,
Integer
hWnd = GetDesktopWindow ()
hSrcDC = GetDC ( hWnd)
nBitsPixel = GetDeviceCaps (hSrcDC, 12)
ReleaseDC ( hWnd,
hSrcDC)
RETURN nBitsPixel
|