Search:
 
Principal
API / Cores - Verificar a configuração de cores do Windo / /

* Exibe a quantidade de cores configurada no windows:

** GetBitsPixel () -> nBitsPorPixel

** Retorna a quantidade de bits por pixel.

** A quantidade de cores são 2

** nBitsPixel (ex.: 8 bits = 256 cores, 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

 

Autor:Rafael Lippert
Relacionados
API :
- Deletar arquivo
- Desligar e Reiniciar o Windows
- Esconder e Exibir a barra de ferramentas
- Habilitar/Desabilitar Barra de Ferramentas e Botão
- Mover arquivo / Copiar-Colar
- Mudar a Resolução
Documento sem título

Rafael Lippert
rafaellippert@gmail.com