comctl32/status: Hide size grip when the parent window is maximized.

Signed-off-by: Waritnan Sookbuntherng <lion328@hotmail.co.th>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Waritnan Sookbuntherng 2018-12-10 09:52:10 +00:00 committed by Alexandre Julliard
parent d8428406c6
commit 1bb95af322
2 changed files with 6 additions and 4 deletions

View File

@ -284,7 +284,8 @@ STATUSBAR_Refresh (STATUS_INFO *infoPtr, HDC hdc)
SelectObject (hdc, hOldFont);
if (GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP)
if ((GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP)
&& !(GetWindowLongW (infoPtr->Notify, GWL_STYLE) & WS_MAXIMIZE))
STATUSBAR_DrawSizeGrip (theme, hdc, &rect);
return 0;
@ -997,7 +998,8 @@ STATUSBAR_WMGetText (const STATUS_INFO *infoPtr, INT size, LPWSTR buf)
static BOOL
STATUSBAR_WMNCHitTest (const STATUS_INFO *infoPtr, INT x, INT y)
{
if (GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP) {
if ((GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP)
&& !(GetWindowLongW (infoPtr->Notify, GWL_STYLE) & WS_MAXIMIZE)) {
RECT rect;
POINT pt;

View File

@ -682,7 +682,7 @@ static void test_sizegrip(void)
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.right, rc.bottom + 1));
expect(HTNOWHERE, r);
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.right - 1, rc.bottom - 1));
todo_wine expect(HTCLIENT, r);
expect(HTCLIENT, r);
/* maximized with right-to-left */
SetWindowLongA(hwndStatus, GWL_EXSTYLE, WS_EX_LAYOUTRTL);
@ -705,7 +705,7 @@ static void test_sizegrip(void)
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.right, rc.bottom + 1));
expect(HTNOWHERE, r);
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.right + 1, rc.bottom - 1));
todo_wine expect(HTCLIENT, r);
expect(HTCLIENT, r);
SetWindowLongA(g_hMainWnd, GWL_STYLE, style);
DestroyWindow(hwndStatus);