GetNearestColor
VB声明
Declare Function GetNearestColor Lib "gdi32" Alias "GetNearestColor" (ByVal hdc As Long, ByVal crColor As Long) As Long
说明
根据设备的显示能力,取得与指定颜色最接近的一种纯色
返回值
Long,取得与指定颜色最接近的一种颜色,这种颜色可由设备场景实际显示出来(给定当前系统调色板)。如返回CLR_INVALID,表示函数执行出错。会设置GetLastError
参数表
参数 类型及说明
hdc Long,设备场景的句柄
crColor Long,欲测试的RGB颜色

Top