Programming Guide |
Removes an item from a menu
int sm_mnitem_delete(int mem_location, char *script, char *menu, int item_no);int sm_n_mnitem_delete(int mem_location, char *script, char *menu, char *item_name);
mem_location
- The memory location of the item's menu, one of the following constants:
MNL_APPLIC
MNL_SCREEN
MNL_FIELDscript
- The name of a memory-resident script that contains the item's menu. If you supply
NULL
, Panther searches in the most recently loaded script inmem_location
for the specified menu.menu
- The name of the item's menu, as listed in the Submenu field of the menu bar editor or with the
MENU
keyword in an ASCII menu file. If you supplyNULL
, Panther uses the first menu inscript
.item_no, item_name
- Specifies the menu item to delete by its number or name:
sm_mnitem_delete
identifies the item by its numeric offset within the menu, where the first menu item is0
.
sm_mnitem_delete
removes an item from a menu and frees the memory associated with it. Panther updates the menu display at the first delayed write.