INFO: Creating DIB Brushes With DIB_PAL_COLORS

ID: Q186585


The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API)
  • Microsoft Windows 2000


SUMMARY

When you use CreateBrushIndirect(), CreateDIBPatternBrush(), or CreateDIBPatternBrushPt() to create a device-independent bitmap (DIB) pattern brush with DIB_PAL_COLORS specified for the color usage, the Graphics Device Interface (GDI) uses the color indices in the bmiColors field in the BITMAPINFO structure to populate the color table of the DIB. GDI resolves the indices to the RGB values from the palette selected into the device context where the brush is selected.

This mapping is performed only once when the brush is selected. Subsequent use of the brush yields results based on the initial mapping because the DIBs color table contains the resolved RGB values rather than the original palette indices.

Additional query words: kbAPI kbBitmap kbGDI kbDSupport kbDSD

Keywords : kbWinOS2000
Version : WINDOWS:; winnt:
Platform : WINDOWS winnt
Issue type : kbinfo


Last Reviewed: December 20, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.