Commit 66f603ce authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Call SetDIBits with a proper DC in order to set bitmap bits.

parent 4d0f0760
...@@ -252,15 +252,12 @@ static void ANIMATE_TransparentBlt(ANIMATE_INFO *infoPtr, HDC hdcDest, HDC hdcSo ...@@ -252,15 +252,12 @@ static void ANIMATE_TransparentBlt(ANIMATE_INFO *infoPtr, HDC hdcDest, HDC hdcSo
static BOOL ANIMATE_PaintFrame(ANIMATE_INFO* infoPtr, HDC hDC) static BOOL ANIMATE_PaintFrame(ANIMATE_INFO* infoPtr, HDC hDC)
{ {
void* pBitmapData = NULL; void *pBitmapData;
LPBITMAPINFO pBitmapInfo = NULL; LPBITMAPINFO pBitmapInfo;
HDC hdcMem; HDC hdcMem;
HBITMAP hbmOld; HBITMAP hbmOld;
int nOffsetX = 0; int nOffsetX = 0;
int nOffsetY = 0; int nOffsetY = 0;
int nWidth; int nWidth;
int nHeight; int nHeight;
...@@ -289,11 +286,11 @@ static BOOL ANIMATE_PaintFrame(ANIMATE_INFO* infoPtr, HDC hDC) ...@@ -289,11 +286,11 @@ static BOOL ANIMATE_PaintFrame(ANIMATE_INFO* infoPtr, HDC hDC)
infoPtr->hbmPrevFrame=CreateCompatibleBitmap(hDC, nWidth,nHeight ); infoPtr->hbmPrevFrame=CreateCompatibleBitmap(hDC, nWidth,nHeight );
} }
SetDIBits(hDC, infoPtr->hbmPrevFrame, 0, nHeight, pBitmapData, (LPBITMAPINFO)pBitmapInfo, DIB_RGB_COLORS);
hdcMem = CreateCompatibleDC(hDC); hdcMem = CreateCompatibleDC(hDC);
hbmOld = SelectObject(hdcMem, infoPtr->hbmPrevFrame); 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, * we need to get the transparent color even without ACS_TRANSPARENT,
* because the style can be changed later on and the color should always * because the style can be changed later on and the color should always
......
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