So far i have gotten GetPixel() to do pretty much exactly what I want it to do inside of the client window. But, is there any way I can get the color of pixels outside the client window?
Heres my current code:
HDC hDC;
PAINTSTRUCT ps;
hDC = BeginPaint(hWnd, &ps);
POINT pt;
GetCursorPos(&pt);
ScreenToClient(hWnd, &pt);
COLORREF rgb = GetPixel(hDC, pt.x, pt.y);
paint(hDC, rgb);
EndPaint(hWnd, &ps);
hWnd is a global variable containing the HWND of the client window paint(hDC, rgb)
is a function that draws a line across the window with the color rgb