mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 18:37:08 +00:00
[Win32k]
- Fix more menu tests, missed flags and fix MIM_APPLYTOSUBMENUS. svn path=/trunk/; revision=62527
This commit is contained in:
parent
05f6960a49
commit
13bd05110c
2 changed files with 17 additions and 6 deletions
|
@ -454,7 +454,17 @@ IntSetMenuInfo(PMENU_OBJECT Menu, PROSMENUINFO lpmi)
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -931,7 +931,7 @@ IntGetSystemMenu(PWND Window, BOOL bRevert, BOOL RetMenu)
|
|||
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 @@ IntGetSystemMenu(PWND Window, BOOL bRevert, BOOL RetMenu)
|
|||
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 @@ IntGetSystemMenu(PWND Window, BOOL bRevert, BOOL RetMenu)
|
|||
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 @@ IntSetSystemMenu(PWND Window, PMENU_OBJECT Menu)
|
|||
OldMenu = IntGetMenuObject(Window->SystemMenu);
|
||||
if(OldMenu)
|
||||
{
|
||||
OldMenu->MenuInfo.Flags &= ~ MF_SYSMENU;
|
||||
OldMenu->MenuInfo.Flags &= ~ MNF_SYSDESKMN;
|
||||
IntReleaseMenuObject(OldMenu);
|
||||
}
|
||||
}
|
||||
|
@ -1435,7 +1436,7 @@ IntSetSystemMenu(PWND Window, PMENU_OBJECT Menu)
|
|||
{
|
||||
/* 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue