Commit 0fe60f83 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

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

Python 3.5 installer creates windows with class "Button" that have 0x000e button style, that causes infinite painting loops and inability to draw the installer UI. Signed-off-by: 's avatarDmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent e79bf359
......@@ -282,16 +282,18 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
case WM_PRINTCLIENT:
case WM_PAINT:
if (btnPaintFunc[btn_type])
{
PAINTSTRUCT ps;
HDC hdc = wParam ? (HDC)wParam : BeginPaint( hWnd, &ps );
if (btnPaintFunc[btn_type])
{
int nOldMode = SetBkMode( hdc, OPAQUE );
(btnPaintFunc[btn_type])( hWnd, hdc, ODA_DRAWENTIRE );
SetBkMode(hdc, nOldMode); /* reset painting mode */
if( !wParam ) EndPaint( hWnd, &ps );
}
if ( !wParam ) EndPaint( hWnd, &ps );
break;
}
case WM_KEYDOWN:
if (wParam == VK_SPACE)
......
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