How can I get the color of a pixel on the screen? Not on my application, anywhere on the screen.
I know I have to use GetPixel, but how do I get the device context, that includes everything on the screen?
C++, Win32, Dev-C++
Printable View
How can I get the color of a pixel on the screen? Not on my application, anywhere on the screen.
I know I have to use GetPixel, but how do I get the device context, that includes everything on the screen?
C++, Win32, Dev-C++
You can open the display as a DC:
Code:CreateDC("DISPLAY", NULL, NULL, NULL);
You can use GetDC and pass NULL as its parameter
Thanks, I'll test these as soon as I can.
Perhaps the GetPixel() function? This is a link to something I did before. Look at it, and modify it to your needs -
http://cboard.cprogramming.com/showp...84&postcount=3
>> how do I get the device context, that includes everything on the screen?
Code:GetDC(HWND_DESKTOP);
// stupid code tags