user32: Fix groupbox rectangle calculation in the button's WM_SETTEXT handler.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2017-02-06 14:23:42 +03:00 committed by Alexandre Julliard
parent e45b80088b
commit d639d3bba0
1 changed files with 3 additions and 0 deletions

View File

@ -394,6 +394,9 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
GetClientRect(hWnd, &client);
rc = client;
/* FIXME: check other BS_* handlers */
if (btn_type == BS_GROUPBOX)
InflateRect(&rc, -7, 1); /* GB_Paint does this */
BUTTON_CalcLabelRect(hWnd, hdc, &rc);
/* Clip by client rect bounds */
if (rc.right > client.right) rc.right = client.right;