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

This commit is contained in:
Alexandre Julliard 2010-04-21 14:56:37 +02:00
parent 3f1c526ea2
commit 5d6e052926
1 changed files with 1 additions and 2 deletions

View File

@ -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);