Fixed a popup menu selection bug.
This commit is contained in:
parent
d0b79c0886
commit
329072dcab
|
@ -3895,14 +3895,19 @@ UINT32 WINAPI GetMenuDefaultItem32(HMENU32 hmenu, UINT32 bypos, UINT32 flags)
|
|||
{
|
||||
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);
|
||||
if (bypos & MF_BYPOSITION)
|
||||
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 -1;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
* InsertMenuItem16 (USER.441)
|
||||
|
|
Loading…
Reference in New Issue