APIIo_​AddMenuItemTextID

Sets the text of a specified menu item that will appear in the Work Environment dialog.

    GSErrCode ACAPI_Interface (
        APIIo_AddMenuItemTextID,
        const API_MenuItemRef*     menuItemRef,
        char*                      weText,
        GS::UniString*             weUniText
    );

 

Parameters

menuItemRef
[in] The referenced menu item.
weText
[in] The text (if you don’t pass weUniText) that will appear as the name of the menu item in the menu customization part of the work environment dialog.
weUniText Featuring API 17
[in] The Unicode text that will appear as the name of the menu item in the menu customization part of the work environment dialog.

 

Return Values

NoError
The function has completed with success.
APIERR_BADPARS
menuItemRef or both itemText and itemUniText are nullptr

For other common API errors see the API Errors document.

 

Remarks

We use this function mainly for palettes. In the Palettes menu the item is usually the title of the palette (e.g. “Element Information”), whereas in the Work Environment dialog it reads “Show/Hide Element Information”.

 

Requirements

Version: API 15 or later
Header: APIdefs_Interface.h

 

See Also

ACAPI_Interface,
API Functions