The information in this article applies to:
SUMMARYWhen using the GDI with DIB sections (HBITMAPs returned by a call to CreateDIBSection()), you may need a way to reference the colors in the color table of the DIB section by index rather than by RGB value. This article shows you how. MORE INFORMATION
To reference a color table value by index, use the DIBINDEX macro defined
in Mmsystem.h. It allows you to index the colors in the color table of a
DIB section in a manner similar to the way PALETTEINDEX indexes a color in
a logical palette. In other words, you can create COLORREFs that reference
a DIB section's color table rather than the logical palette in the DC that
the DIB section is selected into. Because DIBINDEX references values in a
color table, it only works on DCs where you have a DIB section selected.
NOTE: DIBINDEX also works with 16-bit WinGBitmaps and WinGDCs. Additional query words: 3.10 3.50 4.00 Windows 95 COLORTABLE HBITMAP BRUSH COLORREF PEN DIBSECTION
Keywords : kbcode kbWinOS2000 |
Last Reviewed: December 20, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |