From 60cf612b592e83431646d368982cb8e4e1c479e9 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 1 Sep 2000 01:24:19 +0000 Subject: [PATCH] Henning Hoffmann Augment menu when a mdi window starts maximized. --- windows/mdi.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/windows/mdi.c b/windows/mdi.c index 1f65c0e1a54..d482e48c8e6 100644 --- a/windows/mdi.c +++ b/windows/mdi.c @@ -373,6 +373,23 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame, return oldFrameMenu; } } + else + { + INT nItems = GetMenuItemCount(w->parent->wIDmenu) - 1; + UINT iId = GetMenuItemID(w->parent->wIDmenu,nItems) ; + + if( !(iId == SC_RESTORE || iId == SC_CLOSE) ) + { + /* 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(ci, w->parent, ci->hwndChildMaximized ); + } + } WIN_ReleaseWndPtr(w); return 0; }