PALETTEINDEX

  COLORREF PALETTEINDEX(wPaletteIndex)    

This macro accepts an index to a logical color palette entry and returns a value consisting of 1 in the high-order byte and the palette entry index in the low-order bytes. This is called a palette-entry specifier. An application using a color palette can pass this specifier instead of an explicit RGB value to functions that expect a color. This allows the function to use the color in the specified palette entry.

Parameters

wPaletteIndex

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

Return Value

The return value is a logical-palette index specifier. When using a logical palette, an application can use this specifier in place of an explicit RGB value for GDI functions that require a color.

Comments

The PALETTEINDEX macro is defined as:

#define PALETTEINDEX(i) ((DWORD)(0x01000000 | (WORD)(i)))