想用GetPixel做个屏幕拾色器,定义如下:
Declare Function GetPixel Lib "gdi32" Alias "GetPixel" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
问题是我不懂获取显示器的HDC,即设备环境句柄
还有,返回的是Long,是怎么表示RGB的?
求教
Hi X.TK,
我想你可以从这个函数上得到些启发:createDC:http://baike.baidu.com/view/1080521.html?fromTaglist,这是这个函数的具体例子:http://zhidao.baidu.com/question/55709926.html。
关于如何用long型表示RGB,你看下这个网站,肯定一目了然:http://www.9223.com/other/rgb.htm
Best regards,