Fixed a popup menu selection bug.
This commit is contained in:
parent
d0b79c0886
commit
329072dcab
|
@ -3895,13 +3895,18 @@ UINT32 WINAPI GetMenuDefaultItem32(HMENU32 hmenu, UINT32 bypos, UINT32 flags)
|
||||||
{
|
{
|
||||||
POPUPMENU *menu;
|
POPUPMENU *menu;
|
||||||
|
|
||||||
if (!(menu = (POPUPMENU *) USER_HEAP_LIN_ADDR(hmenu))) return 0; /*FIXME*/
|
if (!(menu = (POPUPMENU *) USER_HEAP_LIN_ADDR(hmenu)))
|
||||||
|
return -1;
|
||||||
|
|
||||||
FIXME(menu, "(0x%x,%d,%d), stub!\n", hmenu, bypos, flags);
|
FIXME(menu, "(0x%x,%d,%d), stub!\n", hmenu, bypos, flags);
|
||||||
if (bypos & MF_BYPOSITION)
|
if (bypos & MF_BYPOSITION)
|
||||||
return menu->defitem;
|
return menu->defitem;
|
||||||
else
|
else {
|
||||||
|
FIXME (menu, "default item 0x%x\n", menu->defitem);
|
||||||
|
if ((menu->defitem > 0) && (menu->defitem < menu->nItems))
|
||||||
return menu->items[menu->defitem].wID;
|
return menu->items[menu->defitem].wID;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
|
|
Loading…
Reference in New Issue