CDC::GetNearestColor

返回一个纯色最佳匹配一个指定的逻辑颜色。

COLORREF GetNearestColor(
   COLORREF crColor 
) const;

参数

  • crColor
    指定要匹配的颜色。

返回值

定义纯色最接近 crColor 值设备可能表示的RGB (红色,绿色,蓝色)颜色值。

备注

特定设备必须能够表示此颜色。

要求

Header: afxwin.h

请参见

参考

CDC 类

层次结构图

GetNearestColor

CPalette::GetNearestPaletteIndex