Microsoft KB Archive/186585

{|
 * width="100%"|

INFO: Creating DIB Brushes With DIB_PAL_COLORS

 * }

Q186585

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API)
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Professional

-

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 : kbOSWin2000

Issue type : kbinfo

Technology : kbwin2000AdvServ kbwin2000AdvServSearch kbwin2000Serv kbwin2000ServSearch kbwin2000Search kbwin2000ProSearch kbwin2000Pro kbAudDeveloper kbWinAdvServSearch kbWin32sSearch kbWin32API