Commit 5d6e0529 authored by Alexandre Julliard's avatar Alexandre Julliard

comctl32: Fix handling of bitmap header size for V4/V5 bitmaps.

parent 3f1c526e
......@@ -922,8 +922,7 @@ CreateMappedBitmap (HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags,
if (hbm) {
HDC hdcDst = CreateCompatibleDC (hdcScreen);
HBITMAP hbmOld = SelectObject (hdcDst, hbm);
const BYTE *lpBits = (const BYTE *)(lpBitmap + 1);
lpBits += nColorTableSize * sizeof(RGBQUAD);
const BYTE *lpBits = (const BYTE *)lpBitmap + nSize;
StretchDIBits (hdcDst, 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight,
lpBits, (LPBITMAPINFO)lpBitmapInfo, DIB_RGB_COLORS,
SRCCOPY);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment