[v2 PATCH 2/3] user32/button: Use current button font to clear during WM_SETTEXT

Dmitry Timoshkov dmitry at baikal.ru
Mon Feb 6 04:09:01 CST 2017


Nikolay Sivov <nsivov at codeweavers.com> wrote:

> @@ -394,7 +395,9 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
>  
>              GetClientRect(hWnd, &client);
>              rc = client;
> +            if ((hFont = get_button_font(hWnd))) hPrevFont = SelectObject(hdc, hFont);
>              BUTTON_CalcLabelRect(hWnd, hdc, &rc);
> +            if (hPrevFont) SelectObject(hdc, hPrevFont);

BUTTON_CalcLabelRect() handles all styles of buttons, there is no reason
to penalize every of them, only BS_TEXT style needs to have a proper font
selected.

-- 
Dmitry.



More information about the wine-devel mailing list