Programming Guide |
Removes a menu from the specified script
int sm_menu_delete(int mem_location, char *script, char *menu);
mem_location
- The menu's memory location, one of the following constants:
MNL_APPLIC
MNL_SCREEN
MNL_FIELDscript
- The name of a memory-resident script that contains the menu. The script must already be loaded into memory at
mem_location
by sm_mnscript_load. If you supplyNULL
, Panther searches in the most recently loaded script inmem_location
for the specified menu.menu
- The name of the menu to delete. If you supply
NULL
, Panther uses the first menu inscript
.
sm_menu_delete
removes a menu from memory at runtime and frees the memory allocated for it. This function also destroys all items in the menu and frees the memory associated with them. After you call this function, you can restore this menu only by reloading its script, provided the script's source file already contains the menu definition.