Re: [PATCH 2/2] user32: Erase backgrounds of owner-drawn buttons with the default color.
Alex Henrie <alexhenrie24(a)gmail.com> writes:
@@ -268,13 +268,7 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, { HDC hdc = (HDC)wParam; RECT rc; - HBRUSH hBrush; - HWND parent = GetParent(hWnd); - if (!parent) parent = hWnd; - hBrush = (HBRUSH)SendMessageW(parent, WM_CTLCOLORBTN, (WPARAM)hdc, (LPARAM)hWnd); - if (!hBrush) /* did the app forget to call defwindowproc ? */ - hBrush = (HBRUSH)DefWindowProcW(parent, WM_CTLCOLORBTN, - (WPARAM)hdc, (LPARAM)hWnd); + HBRUSH hBrush = GetSysColorBrush(COLOR_BTNFACE);
This would need a more convincing test. -- Alexandre Julliard julliard(a)winehq.org
2015-06-23 2:19 GMT-06:00 Alexandre Julliard <julliard(a)winehq.org>:
Alex Henrie <alexhenrie24(a)gmail.com> writes:
@@ -268,13 +268,7 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, { HDC hdc = (HDC)wParam; RECT rc; - HBRUSH hBrush; - HWND parent = GetParent(hWnd); - if (!parent) parent = hWnd; - hBrush = (HBRUSH)SendMessageW(parent, WM_CTLCOLORBTN, (WPARAM)hdc, (LPARAM)hWnd); - if (!hBrush) /* did the app forget to call defwindowproc ? */ - hBrush = (HBRUSH)DefWindowProcW(parent, WM_CTLCOLORBTN, - (WPARAM)hdc, (LPARAM)hWnd); + HBRUSH hBrush = GetSysColorBrush(COLOR_BTNFACE);
This would need a more convincing test.
OK. Well, it was a tangential bug anyway. Thanks for accepting the first patch in the series. -Alex
participants (2)
-
Alex Henrie -
Alexandre Julliard