Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>getpixel()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GetPixel()
Return the colour of a pixel
------------------------------------------------------------------------------

Syntax
GetPixel( <hDC>, <nX>, <nY> )   -->   nColour

Arguments
<hDC> specifies the device context for a window.

<nX>, <nY> specify the position of the pixel.

Returns
If successful, the return value is a colour value
(corresponding to colours produced by the RGB() macro).  If
an error is detected (such as an invalid <nX> or <nY>), -1 is
returned.

Description
This function retrieves the actual colour used for a single
pixel in a window.

Example
? "Red component", GetRValue( GetPixel( hDC, 100, 100 ) )


See Also: GetBValue() GetDC() GetGValue() GetRValue() RGB() SetPixel()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson