Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hdc = BeginPaint(hWnd, &ps);
- hBitmap = LoadImage(NULL, L"Untitled.bmp",
- IMAGE_BITMAP, 0,0, LR_LOADFROMFILE);
- GetObject(hBitmap,sizeof(BITMAP), &Bitmap);
- hCompatibleDC = CreateCompatibleDC(hdc);
- hOldBitmap = SelectObject(hCompatibleDC,hBitmap);
- GetClientRect(hWnd, &Rect);
- StretchBlt(hdc,0,0,Rect.right,Rect.bottom,
- hCompatibleDC,0,0, Bitmap.bmWidth,
- Bitmap.bmHeight,SRCCOPY);
- SelectObject(hCompatibleDC,hOldBitmap);
- DeleteObject(hBitmap);
- DeleteDC(hCompatibleDC);
Add Comment
Please, Sign In to add comment