(add-menu-item): Make help_echo and radio buttons

work for most menu items.  From David Ponce
<david.ponce@wanadoo.fr>.
This commit is contained in:
Jason Rumney 2001-11-15 22:53:54 +00:00
parent 9ce647f404
commit 6f665da949

View file

@ -2085,7 +2085,7 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item)
}
/* Draw radio buttons and tickboxes. */
else if (wv->selected && (wv->button_type == BUTTON_TYPE_TOGGLE ||
wv->button_type == BUTTON_TYPE_RADIO))
wv->button_type == BUTTON_TYPE_RADIO))
fuFlags |= MF_CHECKED;
else
fuFlags |= MF_UNCHECKED;
@ -2101,7 +2101,7 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item)
out_string );
/* This must be done after the menu item is created. */
if ((fuFlags & MF_STRING) != 0)
if (!wv->title && wv->call_data != 0)
{
HMODULE user32 = GetModuleHandle ("user32.dll");
FARPROC set_menu_item_info = GetProcAddress (user32, "SetMenuItemInfoA");