Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Collapse the table of content
Expand the table of content


Returns the solid color that best matches a specified logical color.

COLORREF GetNearestColor( 
   COLORREF crColor  
) const;


Specifies the color to be matched.

An RGB (red, green, blue) color value that defines the solid color closest to the crColor value that the device can represent.

The given device must be able to represent this color.

Header: afxwin.h

© 2015 Microsoft