Author: jimtabor
Date: Tue Mar 18 02:56:48 2014
New Revision: 62527
URL:
http://svn.reactos.org/svn/reactos?rev=62527&view=rev
Log:
[Win32k]
- Fix more menu tests, missed flags and fix MIM_APPLYTOSUBMENUS.
Modified:
trunk/reactos/win32ss/user/ntuser/menu.c
trunk/reactos/win32ss/user/ntuser/window.c
Modified: trunk/reactos/win32ss/user/ntuser/menu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/menu.c…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] Tue Mar 18 02:56:48 2014
@@ -454,7 +454,17 @@
Menu->MenuInfo.dwStyle = lpmi->dwStyle;
if(lpmi->fMask & MIM_APPLYTOSUBMENUS)
{
- /* FIXME */
+ int i;
+ PMENU_ITEM item = Menu->MenuItemList;
+ for ( i = Menu->MenuInfo.MenuItemCount; i; i--, item = item->Next)
+ {
+ if ( item->fType & MF_POPUP ) // item->hSubMenu )
+ {
+ PMENU_OBJECT SubMenu;
+ if (!(SubMenu = UserGetMenuObject(item->hSubMenu))) continue;
+ IntSetMenuInfo( SubMenu, lpmi);
+ }
+ }
}
if (sizeof(MENUINFO) < lpmi->cbSize)
{
Modified: trunk/reactos/win32ss/user/ntuser/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/window…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] Tue Mar 18 02:56:48 2014
@@ -931,7 +931,7 @@
if(NewMenu)
{
Window->SystemMenu = NewMenu->MenuInfo.Self;
- NewMenu->MenuInfo.Flags |= MF_SYSMENU;
+ NewMenu->MenuInfo.Flags |= MNF_SYSDESKMN;
NewMenu->MenuInfo.Wnd = Window->head.h;
ret = NewMenu;
//IntReleaseMenuObject(NewMenu);
@@ -950,7 +950,7 @@
UserDestroyMenu(hSysMenu);
return NULL;
}
- SysMenu->MenuInfo.Flags |= MF_SYSMENU;
+ SysMenu->MenuInfo.Flags |= MNF_SYSDESKMN;
SysMenu->MenuInfo.Wnd = Window->head.h;
hNewMenu = co_IntLoadSysMenuTemplate();
if(!hNewMenu)
@@ -970,7 +970,8 @@
NewMenu = IntCloneMenu(Menu);
if(NewMenu)
{
- NewMenu->MenuInfo.Flags |= MF_SYSMENU | MF_POPUP;
+ NewMenu->MenuInfo.Flags |= MNF_SYSDESKMN | MNF_POPUP;
+ NewMenu->MenuInfo.dwStyle = MNS_CHECKORBMP;
IntReleaseMenuObject(NewMenu);
UserSetMenuDefaultItem(NewMenu, SC_CLOSE, FALSE);
@@ -1426,7 +1427,7 @@
OldMenu = IntGetMenuObject(Window->SystemMenu);
if(OldMenu)
{
- OldMenu->MenuInfo.Flags &= ~ MF_SYSMENU;
+ OldMenu->MenuInfo.Flags &= ~ MNF_SYSDESKMN;
IntReleaseMenuObject(OldMenu);
}
}
@@ -1435,7 +1436,7 @@
{
/* FIXME: Check window style, propably return FALSE? */
Window->SystemMenu = Menu->MenuInfo.Self;
- Menu->MenuInfo.Flags |= MF_SYSMENU;
+ Menu->MenuInfo.Flags |= MNF_SYSDESKMN;
}
else
Window->SystemMenu = (HMENU)0;