&MenuItem,
NULL);
if (nPos != (UINT)-1)
- hSubMenu = MenuItem->hSubMenu;
+ hSubMenu = SubMenu->head.h;
else
hMenu = NULL;
}
&MenuItem,
NULL);
if (nPos != (UINT)-1)
- hSubMenu = MenuItem->hSubMenu;
+ hSubMenu = SubMenu->head.h;
else
hMenu = NULL;
}
/* If this is a menu item, there is no capturing enabled and
window is not disabled, send WM_INITMENU */
if (hMenu && !IntGetCaptureWindow())
- {
+ {
co_IntSendMessage(hWnd, WM_INITMENU, (WPARAM)hMenu, 0L);
if (hSubMenu)
{
- this is window menu and window is minimized */
if (!(Window->style & WS_DISABLED) &&
!(hMenu && IntGetMenuState(hMenu, pAccel->cmd, MF_BYCOMMAND) & (MF_DISABLED|MF_GRAYED)) &&
- !(hMenu && hMenu == (HMENU)Window->IDMenu && !(Window->style & WS_MINIMIZED)))
+ !(hMenu && hMenu == (HMENU)Window->IDMenu && (Window->style & WS_MINIMIZED)))
{
/* If this is system menu item, send WM_SYSCOMMAND, otherwise send WM_COMMAND */
if (hMenu && hMenu == Window->SystemMenu)
{
if (co_IntTranslateAccelerator(Window, &Message, &Accel->Table[i]))
{
- TRACE("NtUserTranslateAccelerator returns 1\n");
- RETURN( 1);
+ RETURN( 1);
}
/* Undocumented feature... */
if (Window) UserDerefObjectCo(Window);
if (Accel) UserDerefObjectCo(Accel);
- TRACE("NtUserTranslateAccelerator returns 0\n");
+ TRACE("NtUserTranslateAccelerator returns %d\n", _ret_);
UserLeave();
END_CLEANUP;
}