Author: jimtabor
Date: Wed Aug 31 16:05:34 2016
New Revision: 72520
URL:
http://svn.reactos.org/svn/reactos?rev=72520&view=rev
Log:
[User32]
- MDI Sync/Port from wine head, not sure about Staging.
Modified:
trunk/reactos/win32ss/user/user32/windows/mdi.c
Modified: trunk/reactos/win32ss/user/user32/windows/mdi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/mdi.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/mdi.c [iso-8859-1] Wed Aug 31 16:05:34 2016
@@ -87,11 +87,9 @@
WINE_DEFAULT_DEBUG_CHANNEL(mdi);
#define MDI_MAXTITLELENGTH 0xa1
-#ifdef __REACTOS__
-#define WM_MDICALCCHILDSCROLL 0x003F // ReactOS: Uses correct value.
-#else // Really? ---v win:test_mdi looks for the above
value.
-#define WM_MDICALCCHILDSCROLL 0x10ac /* this is exactly what Windows uses */
-#endif
+
+#define WM_MDICALCCHILDSCROLL 0x003F /* this is exactly what Windows uses */
+
/* "More Windows..." definitions */
#define MDI_MOREWINDOWSLIMIT 9 /* after this number of windows, a "More
Windows..."
option will appear under the Windows menu */
@@ -405,17 +403,6 @@
return (LRESULT)oldFrameMenu;
}
}
- else
- {
- /* SetMenu() may already have been called, meaning that this window
- * already has its menu. But they may have done a SetMenu() on
- * an MDI window, and called MDISetMenu() after the fact, meaning
- * that the "if" to this "else" wouldn't catch the need
to
- * augment the frame menu.
- */
- if( ci->hwndChildMaximized )
- MDI_AugmentFrameMenu( hwndFrame, ci->hwndChildMaximized );
- }
return 0;
}
@@ -435,7 +422,7 @@
if (!IsMenu(ci->hWindowMenu))
{
- WARN("Window menu handle %p is no more valid\n", ci->hWindowMenu);
+ WARN("Window menu handle %p is no longer valid\n",
ci->hWindowMenu);
return 0;
}
@@ -536,8 +523,7 @@
lpMinMax->ptMaxPosition.x = rect.left;
lpMinMax->ptMaxPosition.y = rect.top;
- TRACE("max rect (%ld,%ld - %ld, %ld)\n",
- rect.left,rect.top,rect.right,rect.bottom);
+ TRACE("max rect %s\n", wine_dbgstr_rect(&rect));
}
/**********************************************************************
@@ -1130,9 +1116,7 @@
ci->hBmpClose = 0;
NtUserSetWindowFNID( hwnd, FNID_MDICLIENT); // wine uses WIN_ISMDICLIENT
#else
- WND *wndPtr = WIN_GetPtr( hwnd );
- wndPtr->flags |= WIN_ISMDICLIENT;
- WIN_ReleasePtr( wndPtr );
+ if (message == WM_NCCREATE) win_set_flags( hwnd, WIN_ISMDICLIENT, 0 );
#endif
}
return unicode ? DefWindowProcW( hwnd, message, wParam, lParam ) :
@@ -1342,10 +1326,7 @@
{
RECT rect;
- rect.left = 0;
- rect.top = 0;
- rect.right = LOWORD(lParam);
- rect.bottom = HIWORD(lParam);
+ SetRect(&rect, 0, 0, LOWORD(lParam), HIWORD(lParam));
AdjustWindowRectEx(&rect, GetWindowLongPtrA(ci->hwndActiveChild, GWL_STYLE),
0, GetWindowLongPtrA(ci->hwndActiveChild, GWL_EXSTYLE)
);
MoveWindow(ci->hwndActiveChild, rect.left, rect.top,