Set upper-left corner of destination to (0, 0), using
GetBitmapDimensionEx doesn't make sense.
This commit is contained in:
parent
54b6ccd501
commit
545ecf2ef3
|
@ -568,14 +568,12 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
|
|||
if ((hBitmap = (HBITMAP)GetWindowLongA( hwnd, HICON_GWL_OFFSET )))
|
||||
{
|
||||
BITMAP bm;
|
||||
SIZE sz;
|
||||
|
||||
if(GetObjectType(hBitmap) != OBJ_BITMAP) return;
|
||||
if (!(hMemDC = CreateCompatibleDC( hdc ))) return;
|
||||
GetObjectW(hBitmap, sizeof(bm), &bm);
|
||||
GetBitmapDimensionEx(hBitmap, &sz);
|
||||
oldbitmap = SelectObject(hMemDC, hBitmap);
|
||||
BitBlt(hdc, sz.cx, sz.cy, bm.bmWidth, bm.bmHeight, hMemDC, 0, 0,
|
||||
BitBlt(hdc, 0, 0, bm.bmWidth, bm.bmHeight, hMemDC, 0, 0,
|
||||
SRCCOPY);
|
||||
SelectObject(hMemDC, oldbitmap);
|
||||
DeleteDC(hMemDC);
|
||||
|
|
Loading…
Reference in New Issue