I want to read a rectangular area, or whole screen pixels. As if screenshot button was pressed.
How i do this?
Edit: Working code:
You can use the code below to read the screen pixels:
HWND desktop = GetDesktopWindow(); HDC desktopHdc = GetDC(desktop); COLORREF color = GetPixel(desktopHdc, x, y);