[PATCH 2/2] user32: Erase backgrounds of owner-drawn buttons with the default color.

Alexandre Julliard julliard at winehq.org
Tue Jun 23 03:19:53 CDT 2015


Alex Henrie <alexhenrie24 at 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 at winehq.org



More information about the wine-devel mailing list