Original Post
Hey ! Can somebody point me to a resource that explains how to access the screen on pixel-level ? I get the DC using GetDC(0), and I think I have to use SetDIBits() and GetDIBits(), but they just refuse to work. Thanks a lot !!
HDC dc = GetDC(0);
void *p = NULL;
HBITMAP bitmap = CreateCompatibleBitmap(dc, 1280, 1024);
SelectObject(dc, bitmap);
BITMAPINFO info;
memset(&info, 0, sizeof(info));
info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
GetDIBits(dc, bitmap, 0, 1024, &p, &info, DIB_RGB_COLORS);