Search:
 
Home
API / Colors - Configurations of Windows / /

* 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

 

Author:Rafael Lippert
Similar topics
API :
- Change the Resolution of the Screen
- Delete File
- Enable/Disable the Windows Start Button and TaskBa
- Hide and Unhide the Taskbar for Windows
- Move File
- Shutdown and Restart Windows
Documento sem título

Rafael Lippert
rafaellippert@gmail.com