Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PALETTEINDEX macro

The PALETTEINDEX macro accepts an index to a logical-color palette entry and returns a palette-entry specifier consisting of a COLORREF value that specifies the color associated with the given index. An application using a logical palette 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 in the specified palette entry.

Syntax


COLORREF PALETTEINDEX(
  WORD wPaletteIndex
);

Parameters

wPaletteIndex

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

See also

Colors Overview
Color Macros
COLORREF
PALETTERGB
RGB

 

 

Community Additions

Show:
© 2014 Microsoft