Domanda

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?

È stato utile?

Soluzione

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

I'm using that code and it works!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top