mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[User32]
- MDI Sync/Port from wine head, not sure about Staging. svn path=/trunk/; revision=72520
This commit is contained in:
parent
a809e4ff02
commit
303ece2421
|
@ -87,11 +87,9 @@
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(mdi);
|
WINE_DEFAULT_DEBUG_CHANNEL(mdi);
|
||||||
|
|
||||||
#define MDI_MAXTITLELENGTH 0xa1
|
#define MDI_MAXTITLELENGTH 0xa1
|
||||||
#ifdef __REACTOS__
|
|
||||||
#define WM_MDICALCCHILDSCROLL 0x003F // ReactOS: Uses correct value.
|
#define WM_MDICALCCHILDSCROLL 0x003F /* this is exactly what Windows uses */
|
||||||
#else // Really? ---v win:test_mdi looks for the above value.
|
|
||||||
#define WM_MDICALCCHILDSCROLL 0x10ac /* this is exactly what Windows uses */
|
|
||||||
#endif
|
|
||||||
/* "More Windows..." definitions */
|
/* "More Windows..." definitions */
|
||||||
#define MDI_MOREWINDOWSLIMIT 9 /* after this number of windows, a "More Windows..."
|
#define MDI_MOREWINDOWSLIMIT 9 /* after this number of windows, a "More Windows..."
|
||||||
option will appear under the Windows menu */
|
option will appear under the Windows menu */
|
||||||
|
@ -405,17 +403,6 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame,
|
||||||
return (LRESULT)oldFrameMenu;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -435,7 +422,7 @@ static LRESULT MDI_RefreshMenu(MDICLIENTINFO *ci)
|
||||||
|
|
||||||
if (!IsMenu(ci->hWindowMenu))
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -536,8 +523,7 @@ static void MDI_ChildGetMinMaxInfo( HWND client, HWND hwnd, MINMAXINFO* lpMinMax
|
||||||
lpMinMax->ptMaxPosition.x = rect.left;
|
lpMinMax->ptMaxPosition.x = rect.left;
|
||||||
lpMinMax->ptMaxPosition.y = rect.top;
|
lpMinMax->ptMaxPosition.y = rect.top;
|
||||||
|
|
||||||
TRACE("max rect (%ld,%ld - %ld, %ld)\n",
|
TRACE("max rect %s\n", wine_dbgstr_rect(&rect));
|
||||||
rect.left,rect.top,rect.right,rect.bottom);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
|
@ -1130,9 +1116,7 @@ LRESULT WINAPI MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam,
|
||||||
ci->hBmpClose = 0;
|
ci->hBmpClose = 0;
|
||||||
NtUserSetWindowFNID( hwnd, FNID_MDICLIENT); // wine uses WIN_ISMDICLIENT
|
NtUserSetWindowFNID( hwnd, FNID_MDICLIENT); // wine uses WIN_ISMDICLIENT
|
||||||
#else
|
#else
|
||||||
WND *wndPtr = WIN_GetPtr( hwnd );
|
if (message == WM_NCCREATE) win_set_flags( hwnd, WIN_ISMDICLIENT, 0 );
|
||||||
wndPtr->flags |= WIN_ISMDICLIENT;
|
|
||||||
WIN_ReleasePtr( wndPtr );
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return unicode ? DefWindowProcW( hwnd, message, wParam, lParam ) :
|
return unicode ? DefWindowProcW( hwnd, message, wParam, lParam ) :
|
||||||
|
@ -1342,10 +1326,7 @@ LRESULT WINAPI MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam,
|
||||||
{
|
{
|
||||||
RECT rect;
|
RECT rect;
|
||||||
|
|
||||||
rect.left = 0;
|
SetRect(&rect, 0, 0, LOWORD(lParam), HIWORD(lParam));
|
||||||
rect.top = 0;
|
|
||||||
rect.right = LOWORD(lParam);
|
|
||||||
rect.bottom = HIWORD(lParam);
|
|
||||||
AdjustWindowRectEx(&rect, GetWindowLongPtrA(ci->hwndActiveChild, GWL_STYLE),
|
AdjustWindowRectEx(&rect, GetWindowLongPtrA(ci->hwndActiveChild, GWL_STYLE),
|
||||||
0, GetWindowLongPtrA(ci->hwndActiveChild, GWL_EXSTYLE) );
|
0, GetWindowLongPtrA(ci->hwndActiveChild, GWL_EXSTYLE) );
|
||||||
MoveWindow(ci->hwndActiveChild, rect.left, rect.top,
|
MoveWindow(ci->hwndActiveChild, rect.left, rect.top,
|
||||||
|
|
Loading…
Reference in a new issue