DIBINDEX macro (mmsystem.h)

The DIBINDEX macro takes an index to an entry in a DIB color table and returns a COLORREF value that specifies the color associated with the given index. An application using a device context with a DIB section selected into it can pass this specifier, instead of an explicit red, green, blue (RGB) value, to GDI functions that expect a color. This allows the function to use the color at the specified color table index.

Syntax

void DIBINDEX(
   n
);

Parameters

n

Specifies an index to the color table entry containing the color to be used for a graphics operation.

Return value

None

Remarks

DIBINDEX indexes colors in a DIB color table in a manner similar to the way PALETTEINDEX indexes colors in a logical palette.

DIBINDEX also works with 16-bit bitmaps and device contexts (DCs).

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header mmsystem.h (include Windows.h)

See also

COLORREF

Color Macros

Colors Overview

PALETTEINDEX

RGB