Category Menu manager menus, Object ProMenu

Function ProMenuFromStringsRegister


Description
Defines a new Creo Parametric menu by creating a menu on-the-fly. This function is executed only once during a Creo Parametric session for each menu. Subsequent calls to this function for a previously loaded menu are ignored.

This function affects Menu-Manager (mode-specific) menus only.

NOTE:

If short_help or alt_names is not NULL, the number of elements in the array should be the same as the number of menu items in item_names.

Synopsis
#include <ProMenu.h>
ProErrorProMenuFromStringsRegister(
ProMenuName menu_name
/* (In)
The name of the menu. If alt_name is NULL, menu_name is used as the menu title when the menu is displayed. You should use menu_name to set button actions.
*/
ProName alt_name
/* (In)
An alternate name for the menu. This is used for foreign languagues.
*/
wchar_t* item_names[]
/* (In)
The menu item names. This list is terminated by a NULL string. If alt_names is NULL, the function uses item_names as menu items.
*/
wchar_t* alt_names[]
/* (In)
The alternate names for the menu items.
*/
wchar_t* short_help[]
/* (In)
The one-line help for each menu item. This list is terminated by a NULL string. This can be NULL if no short help is needed.
*/
int* menu_id
/* (Out)
The identifier of the created menu. This argument can be NULL.
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully created the menu.
PRO_TK_GENERAL_ERRORA general error occurred and the function failed.

Manual References:

  1. User Interface: Menus, Commands, and Popupmenus: Run-time Menus

Sample Code References:

  1. pt_examples ( TestAsm.c )
  2. pt_examples ( TestExtref.c )
  3. pt_examples ( TestExtref.c )
  4. pt_examples ( TestExtref.c )
  5. pt_examples ( TestExtref.c )
  6. pt_examples ( TestExtref.c )
  7. pt_examples ( TestExtrefInfo.c )
  8. pt_examples ( TestMechanism.c )
  9. pt_examples ( TestSkelet.c )
  10. pt_examples ( TestSkelet.c )
  11. pt_examples ( TestSkelet.c )
  12. pt_examples ( TestSkelet.c )
  13. pt_examples ( TestTool.c )
  14. pt_examples ( UtilMenu.c )
  15. pt_examples ( UtilMenu.c )
  16. pt_examples ( UtilMenu.c )