BOOL SetPixelV(hdc, X, Y, crColor) | |||||
HDC hdc; | /* handle of device context | */ | |||
int X; | /* x-coordinate of pixel | */ | |||
int Y; | /* y-coordinate of pixel | */ | |||
COLORREF crColor; | /* new pixel color | */ |
The SetPixelV function sets the pixel at the point specified by the X and Y parameters to the closest approximation of the color specified by the crColor parameter. The point must be in the clipping region and the visible part of the device surface.
hdc
Identifies the device context.
X
Specifies the logical x-coordinate of the point to be set.
Y
Specifies the logical y-coordinate of the point to be set.
crColor
Specifies the color used to paint the point.
The return value is TRUE if the function was successful, or FALSE if an error occurred. To obtain extended error information, use the GetLastError function.
Not all devices support the SetPixelV function. For more information, see the RC_BITBLT capability in the GetDeviceCaps function.
SetPixelV is faster than SetPixel because it does not need to return the color value of the point actually painted.
GetDeviceCaps, SetPixel