Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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

ADD
Show:
© 2015 Microsoft