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++
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);
long time; /* know C? */
Unprecedented performance: Nothing ever ran this slow before.
Any sufficiently advanced bug is indistinguishable from a feature.
Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
The best way to accelerate an IBM is at 9.8 m/s/s.
recursion (re - cur' - zhun) n. 1. (see recursion)
You can use GetDC and pass NULL as its parameter
"Think not but that I know these things; or think
I know them not: not therefore am I short
Of knowing what I ought."
-John Milton, Paradise Regained (1671)
"Work hard and it might happen."
-XSquared
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