문제

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?

도움이 되었습니까?

해결책

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

I'm using that code and it works!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top