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>setpixel()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SetPixel()
Set the colour of a pixel
------------------------------------------------------------------------------

Syntax
SetPixel( <hDC>, <nX>, <nY>, <nColour> )   -->   nActualColour

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

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

<nColour> is the colour value (corresponding to colours
produced by the RGB() macro) for the pixel.

Returns
If successful, the return value is the colour value actually
used.  If an error is detected (such as an invalid <nX> or
<nY>), -1 is returned.

Description
This function draws a single pixel, and returns the actual
colour used for it.

Example
nBlack = RGB( 0, 0, 0 )
SetPixel( hDC, 200, 200, nBlack )


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

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