Ryan,
I am having some trouble adding items to a customizable menu. I am able to do this through the IDE, but would like to automate additions for our users here. Here is what I am trying to do following the example you pointed me to from bufftabs.e. But this code is not altering the menu as expected. Is there something, like a _menu_save command that I am missing? Here is the code:
#import "setupext.e"
_command void test_menu_add()
{
//load the SELECT MENU
int index=find_index(SEL_MENU,oi2type(OI_MENU));
//return if menu not found
if (!index) {
_message_box("cannot find: " SEL_MENU);
return;
}
int menu_hndl = p_active_form._menu_load(index);
int foundpos, edit_handle, edit_handle_pos;
_menu_find(menu_hndl, "open-menu _ext_menu_default_sel", edit_handle, edit_handle_pos, "M");
_message_box(menu_hndl " : " edit_handle);
_menu_insert(menu_hndl,23,0,'-');
_message_box(edit_handle_pos);
_menu_show(menu_hndl);
_menu_destroy(menu_hndl);
}
Thanks,
Rob