Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

GetPixel (Windows CE 5.0)

Windows CE 5.0
Send Feedback

This function retrieves the RGB color value of the pixel at the specified coordinates.

COLORREF GetPixel(
  HDC hdc, 
  int nXPos, 
  int nYPos
); 

Parameters

hdc
[in] Handle to the device context.
nXPos
[in] Specifies the logical x-coordinate of the pixel to be examined.
nYPos
[in] Specifies the logical y-coordinate of the pixel to be examined.

Return Values

The RGB value of the pixel indicates success. CLR_INVALID indicates that the pixel is outside of the current clipping region.

Remarks

The pixel must be within the boundaries of the current clipping region.

Not all devices support GetPixel. An application should call GetDeviceCaps to determine whether a specified device supports this function.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Windows.h.
Link Library: Coredll.lib.

See Also

GetDeviceCaps | SetPixel | GDI Functions | COLORREF


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.