Commit 4d1d5fd3 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Accept SIZE_MAXIMIZED as one of statuses of MDI windows.

parent 5d8ffdcb
...@@ -884,7 +884,7 @@ STATUSBAR_WMCreate (HWND hwnd, LPCREATESTRUCTA lpCreate) ...@@ -884,7 +884,7 @@ STATUSBAR_WMCreate (HWND hwnd, LPCREATESTRUCTA lpCreate)
if (GetWindowLongW (lpCreate->hwndParent, GWL_EXSTYLE) & WS_EX_MANAGED) if (GetWindowLongW (lpCreate->hwndParent, GWL_EXSTYLE) & WS_EX_MANAGED)
SetWindowLongW (hwnd, GWL_STYLE, dwStyle & ~SBARS_SIZEGRIP); SetWindowLongW (hwnd, GWL_STYLE, dwStyle & ~SBARS_SIZEGRIP);
if ((hdc = GetDC (0))) { if ((hdc = GetDC (hwnd))) {
TEXTMETRICW tm; TEXTMETRICW tm;
HFONT hOldFont; HFONT hOldFont;
...@@ -892,7 +892,7 @@ STATUSBAR_WMCreate (HWND hwnd, LPCREATESTRUCTA lpCreate) ...@@ -892,7 +892,7 @@ STATUSBAR_WMCreate (HWND hwnd, LPCREATESTRUCTA lpCreate)
GetTextMetricsW (hdc, &tm); GetTextMetricsW (hdc, &tm);
textHeight = tm.tmHeight; textHeight = tm.tmHeight;
SelectObject (hdc, hOldFont); SelectObject (hdc, hOldFont);
ReleaseDC (0, hdc); ReleaseDC (hwnd, hdc);
} }
TRACE(" textHeight=%d\n", textHeight); TRACE(" textHeight=%d\n", textHeight);
...@@ -1059,10 +1059,12 @@ STATUSBAR_WMSize (STATUSWINDOWINFO *infoPtr, WORD flags) ...@@ -1059,10 +1059,12 @@ STATUSBAR_WMSize (STATUSWINDOWINFO *infoPtr, WORD flags)
/* Need to resize width to match parent */ /* Need to resize width to match parent */
TRACE("flags %04x\n", flags); TRACE("flags %04x\n", flags);
if (flags != SIZE_RESTORED) { if (flags != SIZE_RESTORED && flags != SIZE_MAXIMIZED)
WARN("flags MUST be SIZE_RESTORED\n"); {
WARN("flags MUST be SIZE_RESTORED or SIZE_MAXIMIZED\n");
return FALSE; return FALSE;
} }
if (GetWindowLongW(infoPtr->Self, GWL_STYLE) & CCS_NORESIZE) return FALSE; if (GetWindowLongW(infoPtr->Self, GWL_STYLE) & CCS_NORESIZE) return FALSE;
/* width and height don't apply */ /* width and height don't apply */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment