Category Creo Parametric user interface, Object ProMenubar

Function ProMenubarMenuAdd


DEPRECATED: Since Creo 1
SUPERSEDED BY: Depends on the context, consult the user documentation.
Description
Note: This API is deprecated. Use Customize UI dialog to create menus in Creo Parametric Ribbon UI.

Adds a new menu to the menu bar of Creo Parametric. This menu can be used later to add another menus, push buttons, check buttons, and radio groups.

This function affects the top-level Creo Parametric menu bar only.

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.

Replacement in Object TOOLKIT: pfcSession::UIAddMenu
Synopsis
#include <ProMenuBar.h>
ProErrorProMenubarMenuAdd(
ProMenuItemName menu_name
/* (In)
The name of the menu (must be unique)
*/
ProMenuItemLabel untranslated_menu_label
/* (In)
The label of the menu
*/
ProMenuItemName neighbor
/* (In)
The neighbor menu in the menu bar.

Note: If you are adding the first menu to the menu bar of Creo Parametric, set the neighbor argument to NULL.

*/
ProBoolean add_after_neighbor
/* (In)
Defines whether to add the menu to the left or right of the neighbor menu; PRO_B_TRUE specifies to the right.
*/
ProFileName filename
/* (In)
Name of the message file containing the label
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully added the menu.
PRO_TK_MSG_NOT_FOUNDThe specified message was not found in the message file.
PRO_TK_E_FOUNDa menubar entity with this name already exists.
PRO_TK_GENERAL_ERRORThe function failed to add the menu.

Manual References:

  1. Technical Summary of Changes for Creo 11.0.0.0: Functions superseded from Creo 1.0 to Creo 11.0

Sample Code References:

  1. pt_af_examples ( PTAFExampleMain.c )
  2. pt_examples ( TestMain.c )
  3. pt_examples ( TestMenubar.c )
  4. pt_mech_examples ( PTMechExampleMain.c )
  5. pt_udf_examples ( PTUDFExMain.c )
  6. pt_userguide ( UgMain.c )
  7. pt_wc_server ( PTWCServerMain.c )