Call SetDIBits with a proper DC in order to set bitmap bits
Dmitry Timoshkov
dmitry at baikal.ru
Sun Sep 18 04:30:38 CDT 2005
Hello,
this bug appears when DCOM95 decompresses its archive: the animation has
black left and upper areas, just what not initialized memory bitmap has.
Changelog:
Dmitry Timoshkov <dmitry at codeweavers.com>
Call SetDIBits with a proper DC in order to set bitmap bits.
--- cvs/hq/wine/dlls/comctl32/animate.c 2005-08-31 18:27:14.000000000 +0900
+++ wine/dlls/comctl32/animate.c 2005-09-18 18:20:15.000000000 +0900
@@ -252,15 +252,12 @@ static void ANIMATE_TransparentBlt(ANIMA
static BOOL ANIMATE_PaintFrame(ANIMATE_INFO* infoPtr, HDC hDC)
{
- void* pBitmapData = NULL;
- LPBITMAPINFO pBitmapInfo = NULL;
-
+ void *pBitmapData;
+ LPBITMAPINFO pBitmapInfo;
HDC hdcMem;
HBITMAP hbmOld;
-
int nOffsetX = 0;
int nOffsetY = 0;
-
int nWidth;
int nHeight;
@@ -289,11 +286,11 @@ static BOOL ANIMATE_PaintFrame(ANIMATE_I
infoPtr->hbmPrevFrame=CreateCompatibleBitmap(hDC, nWidth,nHeight );
}
- SetDIBits(hDC, infoPtr->hbmPrevFrame, 0, nHeight, pBitmapData, (LPBITMAPINFO)pBitmapInfo, DIB_RGB_COLORS);
-
hdcMem = CreateCompatibleDC(hDC);
hbmOld = SelectObject(hdcMem, infoPtr->hbmPrevFrame);
+ SetDIBits(hdcMem, infoPtr->hbmPrevFrame, 0, nHeight, pBitmapData, pBitmapInfo, DIB_RGB_COLORS);
+
/*
* we need to get the transparent color even without ACS_TRANSPARENT,
* because the style can be changed later on and the color should always
More information about the wine-patches
mailing list