Consequences of Using CreateDIBSection() With DIB_PAL_COLORS (137371)



The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional
  • Microsoft Win32 Software Development Kit (SDK) 3.5
  • Microsoft Win32 Software Development Kit (SDK) 3.51
  • Microsoft Win32 Software Development Kit (SDK) 4.0

This article was previously published under Q137371
When using CreateDIBSection() with DIB_PAL_COLORS, the GDI will use the color indices in the bmiColors to populate the color table of the DIB section by resolving the indices to the RGB values from the palette selected into the device context passed into CreateDIBSection(). Consequently, after a program calls CreateDIBSection(), the color table will contain RGB values rather than palette indices. Specifying DIB_PAL_COLORS affects only how the color table is initialized, not how it is subsequently used.

Modification Type:MinorLast Reviewed:3/21/2005
Keywords:kbFAQ KB137371