|  | Programming Guide |        | 
Gets a menu item's property
int sm_mnitem_get_int(int mem_location, char *script, char *menu, int item_no, int prop);int sm_n_mnitem_get_int(int mem_location, char *script, char *menu, char *item_name, int prop);char *sm_mnitem_get_str(int mem_location, char *script, char *menu, int item_no, int prop);char *sm_n_mnitem_get_str(int mem_location, char *script, char *menu, char *item_name, int prop);
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. The script must already be loaded into memory at
mem_locationby sm_mnscript_load.
menu- The name of the item's menu, as listed in the Submenu field of the menu bar editor or with the
MENUkeyword in an ASCII menu file.
item_no, item_name- Specifies the menu item by its number or name:
sm_mnitem_getidentifies the item by its numeric offset within the menu, where the first menu item is0.
prop- The property to get. Supply one of the constants described in Table 5-17.
- · The property's current value, returned either as an integer or as a pointer to a string value. Because this function stores a returned string in a pool of buffers that it shares with other functions, copy or process this data immediately.
NULLError returned by_get_strvariants. Call sm_menu_bar_error to get the error code.
- -1 Error returned by
_get_intvariants. Call sm_menu_bar_error to get the error code.
sm_mnitem_get_intandsm_mnitem_get_strreturn the current setting of the specified property. Use the_intvariant for those properties that have an integer value—for example,MNI_SEP_STYLE; use the_strvariant for properties that take string values, such asMNI_NAMEandMNI_ACCEL.Table 5-17 lists the menu item property constants that you can supply as arguments to the
propparameter and the values that these return. Integer and string properties are listed in separate groups.



