hdcMem = GetDC (hWnd) ;
hBitmap = CreateCompatibleBitmap(hdcMem, 1200, 900) ;
ReleaseDC ( hWnd, hdcMem ) ;
this i'm told creates the surface, but i'm don't know where to go from there. Any help would be very much appreciated.
thanks
-King
hdcMem = GetDC (hWnd) ;
hBitmap = CreateCompatibleBitmap(hdcMem, 1200, 900) ;
ReleaseDC ( hWnd, hdcMem ) ;
this i'm told creates the surface, but i'm don't know where to go from there. Any help would be very much appreciated.
thanks
-King
BITMAPINFO bmi;
ZeroMemory(&bmi, sizeof(bmi));
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bmi.bmiHeader.biWidth = 1200;
bmi.bmiHeader.biHeight = 900;
bmi.bmiHeader.biBitCount = 32;
bmi.bmiHeader.biPlanes = 1;
HBITMAP hbm = CreateDIBSection(0, &bmi, DIB_RGB_COLORS, NULL, 0, 0);
... or something. To blit into it...
HDC hdc = CreateCompatibleDC(0);
SelectObject(hdc, hbm);
BitBlt(hdc, ... whatever ..., SRCCOPY);
DeleteDC(hdc);
.. to blit it into your window...
HDC hdc = CreateCompatibleDC(0);
SelectObject(hdc, hbm);
BitBlt(hdcWindow, 0, 0, 1200, 900, hdc, 0, 0, SRCCOPY);
DeleteDC(hdc);