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

Alex Henrie alexhenrie24 at gmail.com
Tue Jun 23 10:14:56 CDT 2015


2015-06-23 2:19 GMT-06:00 Alexandre Julliard <julliard at winehq.org>:
> 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.

OK. Well, it was a tangential bug anyway. Thanks for accepting the
first patch in the series.

-Alex



More information about the wine-devel mailing list