mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[Win32SS]
- HAX: Fix menu test crash! - Contract be damned. This number 2 on my list to move server side! svn path=/trunk/; revision=57251
This commit is contained in:
parent
4dc4dad0b3
commit
64823b2694
3 changed files with 36 additions and 1 deletions
|
@ -1814,14 +1814,29 @@ NtUserGetMenuBarInfo(
|
|||
}
|
||||
if (MenuObject->MenuInfo.FocusedItem != NO_SELECTED_ITEM)
|
||||
kmbi.fBarFocused = TRUE;
|
||||
|
||||
if (MenuObject->MenuItemList)
|
||||
{
|
||||
SubMenuObject = UserGetMenuObject(MenuObject->MenuItemList->hSubMenu);
|
||||
if(SubMenuObject) kmbi.hwndMenu = SubMenuObject->MenuInfo.Wnd;
|
||||
}
|
||||
TRACE("OBJID_MENU, idItem = %d\n",idItem);
|
||||
break;
|
||||
}
|
||||
case OBJID_CLIENT:
|
||||
{
|
||||
PMENU_OBJECT SubMenuObject, XSubMenuObject;
|
||||
HMENU hMenuChk;
|
||||
// Windows does this! Wine checks for Atom and uses GetWindowLongPtrW.
|
||||
hMenuChk = (HMENU)co_IntSendMessage(hwnd, MN_GETHMENU, 0, 0);
|
||||
|
||||
if (!(MenuObject = UserGetMenuObject(hMenuChk)))
|
||||
{
|
||||
ERR("Window does not have a Popup Menu!\n");
|
||||
EngSetLastError(ERROR_INVALID_MENU_HANDLE);
|
||||
RETURN(FALSE);
|
||||
}
|
||||
|
||||
SubMenuObject = UserGetMenuObject(MenuObject->MenuItemList->hSubMenu);
|
||||
if(SubMenuObject) kmbi.hMenu = SubMenuObject->MenuInfo.Self;
|
||||
else
|
||||
|
|
|
@ -302,7 +302,7 @@
|
|||
@ stdcall GetLayeredWindowAttributes(long ptr ptr ptr) NtUserGetLayeredWindowAttributes
|
||||
@ stdcall GetListBoxInfo(long) NtUserGetListBoxInfo
|
||||
@ stdcall GetMenu(long)
|
||||
@ stdcall GetMenuBarInfo(long long long ptr) NtUserGetMenuBarInfo
|
||||
@ stdcall GetMenuBarInfo(long long long ptr) ; tempo haxzo NtUserGetMenuBarInfo
|
||||
@ stdcall GetMenuCheckMarkDimensions()
|
||||
@ stdcall GetMenuContextHelpId(long)
|
||||
@ stdcall GetMenuDefaultItem(long long long)
|
||||
|
|
|
@ -4216,6 +4216,26 @@ GetMenu(HWND hWnd)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOL WINAPI GetMenuBarInfo( HWND hwnd, LONG idObject, LONG idItem, PMENUBARINFO pmbi )
|
||||
{
|
||||
BOOL Ret;
|
||||
Ret = NtUserGetMenuBarInfo( hwnd, idObject, idItem, pmbi);
|
||||
// Reason to move to server side!!!!!
|
||||
if (!Ret) return Ret;
|
||||
// EL HAXZO!!!
|
||||
pmbi->fBarFocused = top_popup_hmenu == pmbi->hMenu;
|
||||
if (!idItem)
|
||||
{
|
||||
pmbi->fFocused = pmbi->fBarFocused;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue