Board index » delphi » How to get the Color-mode in Delphi 2 ?

How to get the Color-mode in Delphi 2 ?

How to get the Color-mode in Delphi 2 ?
16 color, 256 colors, 65536 colors (16 bits) and 24 bits.
Which is the function or procedure to use ?

Thanks a lot for your help.   Dieter   mailto:@f...@{*word*104}station.fr

 

Re:How to get the Color-mode in Delphi 2 ?


Quote
Dieter <f...@{*word*104}station.fr> wrote:
>How to get the Color-mode in Delphi 2 ?
>16 color, 256 colors, 65536 colors (16 bits) and 24 bits.
>Which is the function or procedure to use ?

>Thanks a lot for your help.   Dieter   mailto:@f...@{*word*104}station.fr

  hdc := GetDC(0);
  iBits := GetDeviceCaps (hdc, BITSPIXEL) * GetDeviceCaps (hdc, PLANES);
  ReleaseDC (0, hdc);

iBits will be a value in the set (4, 8, 16, 24, 32) and tells you the
number of bits per pixel.  This code works in 16-bit or 32-bit Delphi.

-- Tim Roberts, t...@probo.com
   Providenza & Boekelheide, Inc.

Other Threads