0

the color is #B38300 but it returns me #074092 I'm trying get pixel color of 3D Application.

::SetForegroundWindow(tempHWND);
Sleep(2000);
HDC hDC = ::GetDC(tempHWND);
COLORREF rgb = ::GetPixel(hDC,50,60);
int redValue = GetRValue(rgb);
int greenValue = GetGValue(rgb);
int blueValue = GetBValue(rgb);

How can I get exacly color?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Klasik
  • 872
  • 1
  • 9
  • 29

1 Answers1

0
HDC hDC = CreateDC(L"DISPLAY",0,0,0);

I'm using that code and it works!

Cœur
  • 37,241
  • 25
  • 195
  • 267
Klasik
  • 872
  • 1
  • 9
  • 29