Share via


CPalette::GetNearestPaletteIndex

Returns the index of the entry in the logical palette that most closely matches the specified color value.

UINT GetNearestPaletteIndex(
   COLORREF crColor 
) const;

Parameters

  • crColor
    Specifies the color to be matched.

Return Value

The index of an entry in a logical palette. The entry contains the color that most nearly matches the specified color.

Requirements

Header: afxwin.h

See Also

Reference

CPalette Class

Hierarchy Chart

GetNearestPaletteIndex

Other Resources

CPalette Members