Harkonnen Modérateur Un modo pour les bannir tous | la fonction GDI GetPixel() te renvoie une structure COLORREF correspondant au pixel testé :
Citation :
GetPixel
The GetPixel function retrieves the red, green, blue (RGB) color value of the pixel at the specified coordinates. COLORREF GetPixel(
HDC hdc, // handle to DC
int nXPos, // x-coordinate of pixel
int nYPos // y-coordinate of pixel
);
Parameters
hdc [in] Handle to the device context. nXPos [in] Specifies the x-coordinate, in logical units, of the pixel to be examined. nYPos [in] Specifies the y-coordinate, in logical units, of the pixel to be examined. Return Values
The return value is the RGB value of the pixel. If the pixel is outside of the current clipping region, the return value is CLR_INVALID. 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.
|
Citation :
COLORREF
The COLORREF value is used to specify an RGB color. typedef DWORD COLORREF;
typedef DWORD *LPCOLORREF;
Remarks
When specifying an explicit RGB color, the COLORREF value has the following hexadecimal form: 0x00bbggrr The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue. The high-order byte must be zero. The maximum value for a single byte is 0xFF. To create a COLORREF color value, use the RGB macro. To extract the individual values for the red, green, and blue components of a color value, use the GetRValue, GetGValue, and GetBValue macros, respectively.
|
---------------
J'ai un string dans l'array (Paris Hilton)
|