Programming Guide



sm_*mnitem_delete

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_FIELD

script
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 in mem_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 supply NULL, Panther uses the first menu in script.

item_no, item_name
Specifies the menu item to delete by its number or name:

Returns

Description

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.