From 5d6e052926c12518b587851540591a5ae5435efe Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 21 Apr 2010 14:56:37 +0200 Subject: [PATCH] comctl32: Fix handling of bitmap header size for V4/V5 bitmaps. --- dlls/comctl32/commctrl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index 1283badd825..eb0f6b5293e 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -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);