I've implemented a simple screenshot capture method, where I do the following:
- Get the screen DC by calling GetDC (NULL);
- Use CreateCompatibleDC () to create a device context.
- Grab width/height of the screen by calling GetDeviceCaps ().
- Calling CreateCompatibleBitmap (screenDC, width, height);
- Calling SelectObject (deviceContext, bitmap);
- Finally, calling BitBlt (deviceContext, 0, 0, x, y, screenDC, 0, 0, SRCCOPY | CAPTUREBLT); and GetDIBits () to get the data pointer.
Any advice is greatly appreciated!








