Processing Bitmap Data (part deux)
<<< split http://cboard.cprogramming.com/windo...tmap-data.html >>>
I'm trying to use this example to do some very similar task, but not on bitmap loaded from file but on screenshot. It seams that whole dBitmap is black.
This is the code
Code:
hdc = GetDC(hWnd);
GetWindowRect(hWnd, &rcClient);
dBitmap = CreateCompatibleBitmap(hdc,rcClient.right-rcClient.left, rcClient.bottom-rcClient.top);
if(!dBitmap)
MessageBox(hWnd, L"CreateCompatibleBitmap Failed",L"Failed", MB_OK);
pixels = GetBitmapPixels(dBitmap, hdc);
GetObject(dBitmap, sizeof(BITMAP), &bmp);
any suggestions?