CDC::GetPixel
Visual Studio 2005
Retrieves the RGB color value of the pixel at the point specified by x and y.
COLORREF GetPixel( int x, int y ) const; COLORREF GetPixel( POINT point ) const;
Parameters
- x
-
Specifies the logical x-coordinate of the point to be examined.
- y
-
Specifies the logical y-coordinate of the point to be examined.
- point
-
Specifies the logical x- and y-coordinates of the point to be examined.
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.
The GetPixel member function has two forms. The first takes two coordinate values; the second takes either a POINT structure or a CPoint object.