|
-
July 21st, 2010, 09:24 AM
#1
Am I BitBlt'ing Bitmap correctly? wrong code?
Im trying to replace my gdi+ DrawImage() code to BitBlt'ing code to speed things up but my image won't paint to the screen?
Is this the correct code? thanks.
hdc = BeginPaint (hWnd, &ps);
HDC hdcMem = CreateCompatibleDC(hdc);
SelectObject(hdcMem, myBitmap);
BitBlt(hdc, 0, 0, myBitmap->GetWidth(), myBitmap->GetHeight(), hdcMem, 0, 0, SRCCOPY);
DeleteDC(hdcMem);
When I was using DrawImage() everything was fine. but too slow.
Im really am sure this is not the right code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|