CDC::GetNearestColor

This method retrieves the solid color that best matches a specified logical color. The specified device must be able to represent this color.

At a Glance

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

Syntax

COLORREF GetNearestColor( COLORREF crColor ) const;