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, ...@@ -922,8 +922,7 @@ CreateMappedBitmap (HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags,
if (hbm) { if (hbm) {
HDC hdcDst = CreateCompatibleDC (hdcScreen); HDC hdcDst = CreateCompatibleDC (hdcScreen);
HBITMAP hbmOld = SelectObject (hdcDst, hbm); HBITMAP hbmOld = SelectObject (hdcDst, hbm);
const BYTE *lpBits = (const BYTE *)(lpBitmap + 1); const BYTE *lpBits = (const BYTE *)lpBitmap + nSize;
lpBits += nColorTableSize * sizeof(RGBQUAD);
StretchDIBits (hdcDst, 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight, StretchDIBits (hdcDst, 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight,
lpBits, (LPBITMAPINFO)lpBitmapInfo, DIB_RGB_COLORS, lpBits, (LPBITMAPINFO)lpBitmapInfo, DIB_RGB_COLORS,
SRCCOPY); 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