I'm having trouble with getpixel function.
Sometimes it returns the correct pixel ref and others it returns "4294967295" which I think is "CLR_INVALID"
COLORREF color;
HDC hdc_ = GetDC(NULL); //get dc of whole screen
color = GetPixel(hdc_, 10, 10);
std::cout << color << endl;
That is the simple code, any idea why this might happen?
Any thoughts appreciated.