mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
little fix
svn path=/trunk/; revision=8952
This commit is contained in:
parent
23e366974c
commit
b8560b708d
1 changed files with 7 additions and 3 deletions
|
@ -21,7 +21,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: menu.c,v 1.60 2004/04/02 19:00:56 weiden Exp $
|
/* $Id: menu.c,v 1.61 2004/04/02 19:14:44 weiden Exp $
|
||||||
*
|
*
|
||||||
* PROJECT: ReactOS user32.dll
|
* PROJECT: ReactOS user32.dll
|
||||||
* FILE: lib/user32/windows/menu.c
|
* FILE: lib/user32/windows/menu.c
|
||||||
|
@ -1989,7 +1989,9 @@ MenuInitSysMenuPopup(HMENU Menu, DWORD Style, DWORD ClsStyle, LONG HitTest )
|
||||||
{
|
{
|
||||||
BOOL Gray;
|
BOOL Gray;
|
||||||
UINT DefItem;
|
UINT DefItem;
|
||||||
|
#if 0
|
||||||
MENUITEMINFOW mii;
|
MENUITEMINFOW mii;
|
||||||
|
#endif
|
||||||
|
|
||||||
Gray = 0 == (Style & WS_THICKFRAME) || 0 != (Style & (WS_MAXIMIZE | WS_MINIMIZE));
|
Gray = 0 == (Style & WS_THICKFRAME) || 0 != (Style & (WS_MAXIMIZE | WS_MINIMIZE));
|
||||||
EnableMenuItem(Menu, SC_SIZE, (Gray ? MF_GRAYED : MF_ENABLED));
|
EnableMenuItem(Menu, SC_SIZE, (Gray ? MF_GRAYED : MF_ENABLED));
|
||||||
|
@ -2025,13 +2027,15 @@ MenuInitSysMenuPopup(HMENU Menu, DWORD Style, DWORD ClsStyle, LONG HitTest )
|
||||||
DefItem = SC_CLOSE;
|
DefItem = SC_CLOSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
mii.cbSize = sizeof(MENUITEMINFOW);
|
mii.cbSize = sizeof(MENUITEMINFOW);
|
||||||
mii.fMask = MIIM_STATE;
|
mii.fMask = MIIM_STATE;
|
||||||
if(GetMenuItemInfoW(Menu, DefItem, FALSE, &mii) &&
|
if((DefItem != SC_CLOSE) && GetMenuItemInfoW(Menu, DefItem, FALSE, &mii) &&
|
||||||
(mii.fState & (MFS_GRAYED | MFS_DISABLED)))
|
(mii.fState & (MFS_GRAYED | MFS_DISABLED)))
|
||||||
{
|
{
|
||||||
DefItem = SC_CLOSE;
|
DefItem = SC_CLOSE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
SetMenuDefaultItem(Menu, DefItem, MF_BYCOMMAND);
|
SetMenuDefaultItem(Menu, DefItem, MF_BYCOMMAND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2121,7 +2125,7 @@ MenuShowSubPopup(HWND WndOwner, PROSMENUINFO MenuInfo, BOOL SelectFirst, UINT Fl
|
||||||
if (IS_SYSTEM_MENU(MenuInfo))
|
if (IS_SYSTEM_MENU(MenuInfo))
|
||||||
{
|
{
|
||||||
MenuInitSysMenuPopup(ItemInfo.hSubMenu, GetWindowLongW(MenuInfo->Wnd, GWL_STYLE),
|
MenuInitSysMenuPopup(ItemInfo.hSubMenu, GetWindowLongW(MenuInfo->Wnd, GWL_STYLE),
|
||||||
GetClassLongW(MenuInfo->Wnd, GCL_STYLE), FALSE);
|
GetClassLongW(MenuInfo->Wnd, GCL_STYLE), HTSYSMENU);
|
||||||
|
|
||||||
NcGetSysPopupPos(MenuInfo->Wnd, &Rect);
|
NcGetSysPopupPos(MenuInfo->Wnd, &Rect);
|
||||||
Rect.top = Rect.bottom;
|
Rect.top = Rect.bottom;
|
||||||
|
|
Loading…
Reference in a new issue