comctl32: Get the background colour in ANIMATE_PaintFrame, instead of just in WM_PAINT.

This fixes the rendering of transparent animations when using a 
background thread.
This commit is contained in:
Rob Shearman 2008-01-31 14:47:03 +00:00 committed by Alexandre Julliard
parent 7bc9e425f1
commit 53c6cdf918
1 changed files with 3 additions and 5 deletions

View File

@ -317,6 +317,9 @@ static BOOL ANIMATE_PaintFrame(ANIMATE_INFO* infoPtr, HDC hDC)
rect.right = nWidth; rect.right = nWidth;
rect.bottom = nHeight; rect.bottom = nHeight;
infoPtr->hbrushBG = (HBRUSH)SendMessageW(infoPtr->hwndNotify,
WM_CTLCOLORSTATIC,
(WPARAM)hDC, (LPARAM)infoPtr->hwndSelf);
if(!infoPtr->hbrushBG) if(!infoPtr->hbrushBG)
infoPtr->hbrushBG = GetCurrentObject(hDC, OBJ_BRUSH); infoPtr->hbrushBG = GetCurrentObject(hDC, OBJ_BRUSH);
@ -929,11 +932,6 @@ static LRESULT WINAPI ANIMATE_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LP
return DefWindowProcW(hWnd, uMsg, wParam, lParam); return DefWindowProcW(hWnd, uMsg, wParam, lParam);
} }
if (infoPtr->dwStyle & ACS_TRANSPARENT)
infoPtr->hbrushBG = (HBRUSH)SendMessageW(infoPtr->hwndNotify,
WM_CTLCOLORSTATIC,
wParam, (LPARAM)infoPtr->hwndSelf);
if (wParam) if (wParam)
{ {
EnterCriticalSection(&infoPtr->cs); EnterCriticalSection(&infoPtr->cs);