CDC::GetNearestColor 

COLORREFGetNearestColor(COLORREFcrColor**)const;**

Return Value

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

Parameters

crColor

Specifies the color to be matched.

Remarks

Returns the solid color that best matches a specified logical color. The given device must be able to represent this color.

CDC OverviewClass MembersHierarchy Chart

See Also   , CPalette::GetNearestPaletteIndex