Fixed a popup menu selection bug.

This commit is contained in:
Eric Kohl 1998-10-24 10:46:10 +00:00 committed by Alexandre Julliard
parent d0b79c0886
commit 329072dcab
1 changed files with 8 additions and 3 deletions

View File

@ -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;
} }
/******************************************************************* /*******************************************************************