CPalette::GetNearestPaletteIndex

This method returns the index of the entry in the logical palette that most closely matches the specified color value.

At a Glance

Header file: Afxwin.h
Platforms: Palm-size PC, H/PC Pro
Windows CE versions: 2.10 and later
Complete documentation: Visual C++ documentation

Syntax

UINT GetNearestPaletteIndex( COLORREF crColor ) const;