我在VIEW类的ON_KEYDOWN里设了以下语句:
COLORREF clrGet;
CClientDC dc(this);
clrGet = dc.GetPixel(30, 50);
但是无论点(30,50)的颜色如何,clrGet的值都是一样,如何解决啊?????!!!
COLORREF clrGet;
CClientDC dc(this);
clrGet = dc.GetPixel(30, 50);
但是无论点(30,50)的颜色如何,clrGet的值都是一样,如何解决啊?????!!!
Retrieves the RGB color value of the pixel at the point specified by x and y. The point must be in the clipping region. If the point is not in the clipping region, the function has no effect and returns –1. Not all devices support the GetPixel function. For more information, see the RC_BITBLT raster capability under the GetDeviceCaps member function.是不是因为“Not all devices support the GetPixel function”呢?