comctl32: Always call BeginPaint/EndPaint when handling a WM_PAINT message for the button.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2015-10-20 21:56:15 +08:00 committed by Alexandre Julliard
parent 3708d53373
commit 59cca65ce0
1 changed files with 1 additions and 4 deletions

View File

@ -319,9 +319,6 @@ static BOOL BUTTON_Paint(HTHEME theme, HWND hwnd, HDC hParamDC)
ButtonState drawState;
pfThemedPaint paint = btnThemedPaintFunc[ dwStyle & BUTTON_TYPE ];
if(!paint)
return FALSE;
if(IsWindowEnabled(hwnd))
{
if(state & BST_PUSHED) drawState = STATE_PRESSED;
@ -332,7 +329,7 @@ static BOOL BUTTON_Paint(HTHEME theme, HWND hwnd, HDC hParamDC)
else drawState = STATE_DISABLED;
hDC = hParamDC ? hParamDC : BeginPaint(hwnd, &ps);
paint(theme, hwnd, hDC, drawState, dtFlags, state & BST_FOCUS);
if (paint) paint(theme, hwnd, hDC, drawState, dtFlags, state & BST_FOCUS);
if (!hParamDC) EndPaint(hwnd, &ps);
return TRUE;
}