From 5104d39515787fc6b37c66fec3b93b8800b619e0 Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Wed, 22 Feb 2017 13:24:17 +0000 Subject: [PATCH] [COMCTL32] -Fix a couple more button tests. svn path=/trunk/; revision=73884 --- reactos/dll/win32/comctl32/button.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/comctl32/button.c b/reactos/dll/win32/comctl32/button.c index 325a72abb58..e3e0844bf3e 100644 --- a/reactos/dll/win32/comctl32/button.c +++ b/reactos/dll/win32/comctl32/button.c @@ -626,7 +626,10 @@ LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg, case WM_SETFOCUS: TRACE("WM_SETFOCUS %p\n",hWnd); set_button_state( hWnd, get_button_state(hWnd) | BST_FOCUS ); - InvalidateRect(hWnd, NULL, FALSE); + if (btn_type == BS_OWNERDRAW) + paint_button( hWnd, btn_type, ODA_FOCUS ); + else + InvalidateRect(hWnd, NULL, FALSE); if (style & BS_NOTIFY) BUTTON_NOTIFY_PARENT(hWnd, BN_SETFOCUS); break; @@ -635,7 +638,6 @@ LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg, TRACE("WM_KILLFOCUS %p\n",hWnd); state = get_button_state( hWnd ); set_button_state( hWnd, state & ~BST_FOCUS ); - paint_button( hWnd, btn_type, ODA_FOCUS ); if ((state & BUTTON_BTNPRESSED) && GetCapture() == hWnd) ReleaseCapture();