[Previous] [Contents] [Index] [Next]

ApGetItemText()

Get the text for a menu item

Synopsis:

#include <Ap.h>

char * ApGetItemText( ApMenuLink_t *menu,
                      int item_name);

Description:

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.

Returns:

A pointer to a text string or translated text, or NULL if the ABN_ name is invalid.


Caution: 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.

Examples:

text = ApGetItemText( &mymenu, ABN_item1 );

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

ApModifyItemText()


[Previous] [Contents] [Index] [Next]