I have the following code:
HWND hwn= FindWindow(NULL,"CABAL");
HDC hdc = GetDC(hwn);
COLORREF x;
POINT m;
m.x=50;
m.y=50;
ScreenToClient(hwn,&m);
x=gp(hdc,m.x,m.y);
if(x==CLR_INVALID)
cout<<"CLR_INVALID\n";
cout<<"Red: "<<(int)GetRValue(x)<<"\n"<<"Green: "<<(int)GetGValue(x)<<"\n"<<"Blue: "<<(int)GetBValue(x)<<"\n";
The problem is gp( GetPixel ) always returns CLR_INVALID and white (255,255,255).
Also, I find it strange that SetPixel works with any coordonates.
Any ideas?