comparison src/w32menu.c @ 30053:baccf5e9ab70

* w32menu.c (w32_menu_display_help): * xmenu.c (menu_help_callback): Use show_help_echo.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 05 Jul 2000 14:08:03 +0000
parents 33aa00975055
children e75b1b3a94f4
comparison
equal deleted inserted replaced
30052:324e0b1b2ac1 30053:baccf5e9ab70
2156 HMODULE user32 = GetModuleHandle ("user32.dll"); 2156 HMODULE user32 = GetModuleHandle ("user32.dll");
2157 FARPROC get_menu_item_info = GetProcAddress (user32, "GetMenuItemInfoA"); 2157 FARPROC get_menu_item_info = GetProcAddress (user32, "GetMenuItemInfoA");
2158 2158
2159 if (get_menu_item_info) 2159 if (get_menu_item_info)
2160 { 2160 {
2161 struct gcpro gcpro1;
2162 extern Lisp_Object Vshow_help_function;
2163 Lisp_Object msg;
2164 MENUITEMINFO info; 2161 MENUITEMINFO info;
2165 2162
2166 bzero (&info, sizeof (info)); 2163 bzero (&info, sizeof (info));
2167 info.cbSize = sizeof (info); 2164 info.cbSize = sizeof (info);
2168 info.fMask = MIIM_DATA; 2165 info.fMask = MIIM_DATA;
2169 get_menu_item_info (menu, item, FALSE, &info); 2166 get_menu_item_info (menu, item, FALSE, &info);
2170 2167
2171 msg = info.dwItemData ? build_string ((char *) info.dwItemData) : Qnil; 2168 show_help_echo (info.dwItemData ?
2172 GCPRO1 (msg); 2169 build_string ((char *) info.dwItemData) : Qnil);
2173
2174 if (!NILP (Vshow_help_function))
2175 call1 (Vshow_help_function, msg);
2176 else if (!MINI_WINDOW_P (XWINDOW (selected_window)))
2177 {
2178 if (STRINGP(msg))
2179 message3_nolog (msg, XSTRING (msg)->size, STRING_MULTIBYTE (msg));
2180 else
2181 message (0);
2182 }
2183 UNGCPRO;
2184 } 2170 }
2185 } 2171 }
2186 2172
2187 2173
2188 2174