diff --git a/dll/win32/comctl32/status.c b/dll/win32/comctl32/status.c index 02e26b0a9d9..63db0202532 100644 --- a/dll/win32/comctl32/status.c +++ b/dll/win32/comctl32/status.c @@ -95,11 +95,6 @@ STATUSBAR_SetPartBounds (STATUS_INFO *infoPtr); static LRESULT STATUSBAR_NotifyFormat (STATUS_INFO *infoPtr, HWND from, INT cmd); -static inline LPCSTR debugstr_t(LPCWSTR text, BOOL isW) -{ - return isW ? debugstr_w(text) : debugstr_a((LPCSTR)text); -} - static UINT STATUSBAR_ComputeHeight(STATUS_INFO *infoPtr) { @@ -291,7 +286,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; @@ -705,11 +701,6 @@ STATUSBAR_SetTextT (STATUS_INFO *infoPtr, INT nPart, WORD style, BOOL changed = FALSE; INT oldStyle; - if (style & SBT_OWNERDRAW) { - TRACE("part %d, text %p\n",nPart,text); - } - else TRACE("part %d, text %s\n", nPart, debugstr_t(text, isW)); - /* MSDN says: "If the parameter is set to SB_SIMPLEID (255), the status * window is assumed to be a simple window */ @@ -1004,7 +995,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; @@ -1014,10 +1006,7 @@ STATUSBAR_WMNCHitTest (const STATUS_INFO *infoPtr, INT x, INT y) pt.y = y; ScreenToClient (infoPtr->Self, &pt); - rect.left = rect.right - 13; - rect.top += 2; - - if (PtInRect (&rect, pt)) + if (pt.x >= rect.right - GetSystemMetrics(SM_CXVSCROLL)) { if (GetWindowLongW( infoPtr->Self, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL) return HTBOTTOMLEFT; else return HTBOTTOMRIGHT; @@ -1033,7 +1022,6 @@ STATUSBAR_WMPaint (STATUS_INFO *infoPtr, HDC hdc) { PAINTSTRUCT ps; - TRACE("\n"); if (hdc) return STATUSBAR_Refresh (infoPtr, hdc); hdc = BeginPaint (infoPtr->Self, &ps); STATUSBAR_Refresh (infoPtr, hdc); @@ -1064,7 +1052,6 @@ STATUSBAR_WMSetText (const STATUS_INFO *infoPtr, LPCSTR text) STATUSWINDOWPART *part; int len; - TRACE("\n"); if (infoPtr->numParts == 0) return FALSE; @@ -1092,7 +1079,6 @@ STATUSBAR_WMSize (STATUS_INFO *infoPtr, WORD flags) RECT parent_rect; /* Need to resize width to match parent */ - TRACE("flags %04x\n", flags); if (flags != SIZE_RESTORED && flags != SIZE_MAXIMIZED) { WARN("flags MUST be SIZE_RESTORED or SIZE_MAXIMIZED\n"); @@ -1110,6 +1096,10 @@ STATUSBAR_WMSize (STATUS_INFO *infoPtr, WORD flags) y = parent_rect.bottom - infoPtr->height; MoveWindow (infoPtr->Self, x, y, width, infoPtr->height, TRUE); STATUSBAR_SetPartBounds (infoPtr); +#ifdef __REACTOS__ + parent_rect = infoPtr->parts[infoPtr->numParts - 1].bound; + InvalidateRect(infoPtr->Self, &parent_rect, TRUE); +#endif return TRUE; }