Get the text for a menu item
#include <Ap.h> char * ApGetItemText( ApMenuLink_t *menu, int item_name);
ApGetItemText() is used to extract the text of a menu item in a PhAB menu module. The menu argument is a pointer to a PhAB menu link structure. The item_name argument is the ABN_ name of the menu item, as generated by PhAB. If a language translation is in effect, the translated string is returned rather than the default text built into the application.
A pointer to a text string or translated text, or NULL if the ABN_ name is invalid.
Don't free the returned text string, or your application will crash. |
If you call ApModifyItemText() after calling ApGetItemText() for the same menu item, the string returned by ApGetItemText() becomes invalid.
text = ApGetItemText( &mymenu, ABN_item1 );
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |