Commit 329072dc authored by Eric Kohl's avatar Eric Kohl Committed by Alexandre Julliard

Fixed a popup menu selection bug.

parent d0b79c08
...@@ -3895,13 +3895,18 @@ UINT32 WINAPI GetMenuDefaultItem32(HMENU32 hmenu, UINT32 bypos, UINT32 flags) ...@@ -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;
} }
/******************************************************************* /*******************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment