Please enable JavaScript to view this site.

A-Shell Development History

AUI_MENU enhancements: You may add menu items that act like the internal menu items, using the new mtype flag MBF_MENUID (&h00040000), and putting the string representation of the internal ID value (which must be one of the pre-defined values used by the internal menus and in the range of 100-199) in the Cmd parameter. This technique is useful in cases where you want to remove and later re-add individual internal menu items, or where you want to rearrange some of the internal menu items. For example, to delete File > Exit and add a "New Exit" option to the Settings menu:

mnu'exit'id$ = "111"    ! internal ID of File > Exit

xcall AUI, AUI_MENU, MNUOP_DEL, 1, mnu'exit'id$, 0, 0, "", "", status

xcall AUI, AUI_MENU, MNUOP_ADD, 3, "New Exit", MBST_ENABLE, MBF_MENUID, mnu'exit'id$, "", status

 

Note that the menuid parameters 1 and 3 reference the top level File and Settings menu by position.