Category Creo Parametric user interface, Object ProMenubarmenu

Function ProMenubarmenuPushbuttonAdd


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 push button to the menu of Creo Parametric.

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

This function is executed only once during a Creo Parametric session for each push button. Subsequent calls to this function for a previously loaded push button are ignored.

Note:

To find the name of an existing item to use as a neighbor, select that item in Creo Parametric and look at your trail file.

Replacement in Object TOOLKIT: pfcSession::UIAddButton
Synopsis
#include <ProMenuBar.h>
ProErrorProMenubarmenuPushbuttonAdd(
ProMenuItemName parent_menu
/* (In)
The name of the parent menu
*/
ProMenuItemName push_button_name
/* (In)
The name of the push button (must be unique)
*/
ProMenuItemLabel push_button_label
/* (In)
The label of the push button
*/
ProMenuLineHelp one_line_help
/* (In)
The one-line help for the push button
*/
ProMenuItemName neighbor
/* (In)
The neighbor item in the parent menu.

Note: If you are adding the first item to a new menu (created using either ProMenubarMenuAdd() or ProMenubarmenuMenuAdd()), set the neighbor argument to NULL.

*/
ProBoolean add_after_neighbor
/* (In)
Defines whether to add the button before or after the neighbor item; PRO_B_TRUE specifies after.
*/
uiCmdCmdId action_id
/* (In)
The identifier of the action attached to the push button
*/
ProFileName filename
/* (In)
The name of the message file that contains the label and help string
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully added a push button.
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 a push button.

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_af_examples ( PTAFExampleMain.c )
  3. pt_af_examples ( PTAFExampleMain.c )
  4. pt_af_examples ( PTAFExampleMain.c )
  5. pt_af_examples ( PTAFExampleMain.c )
  6. pt_af_examples ( PTAFExampleMain.c )
  7. pt_async ( TestAsync.c )
  8. pt_autoaxis ( AutoAxis.c )
  9. pt_examples ( TestMain.c )
  10. pt_examples ( TestMain.c )
  11. pt_examples ( TestMain.c )
  12. pt_examples ( TestMain.c )
  13. pt_examples ( TestMain.c )
  14. pt_examples ( TestMain.c )
  15. pt_examples ( TestMain.c )
  16. pt_examples ( TestMain.c )
  17. pt_examples ( TestMain.c )
  18. pt_examples ( TestMain.c )
  19. pt_examples ( TestMain.c )
  20. pt_examples ( TestMain.c )
  21. pt_examples ( TestMain.c )
  22. pt_examples ( TestMain.c )
  23. pt_examples ( TestMain.c )
  24. pt_examples ( TestMenubar.c )
  25. pt_examples ( TestMenubar.c )
  26. pt_examples ( TestMenubar.c )
  27. pt_geardesign ( GearDesign.c )
  28. pt_install_cxx ( TestInstall.cxx )
  29. pt_install_cxx ( TestInstall.cxx )
  30. pt_install_test ( TestInstall.c )
  31. pt_install_test ( TestInstall.c )
  32. pt_mech_examples ( PTMechExampleMain.c )
  33. pt_mech_examples ( PTMechExampleMain.c )
  34. pt_mech_examples ( PTMechExampleMain.c )
  35. pt_mech_examples ( PTMechExampleMain.c )
  36. pt_mech_examples ( PTMechExampleMain.c )
  37. pt_mech_examples ( PTMechExampleMain.c )
  38. pt_udf_examples ( PTUDFExMain.c )
  39. pt_userguide ( UgMain.c )
  40. pt_userguide ( UgMain.c )
  41. pt_userguide ( UgMain.c )
  42. pt_userguide ( UgMain.c )
  43. pt_userguide ( UgMain.c )
  44. pt_userguide ( UgMain.c )
  45. pt_userguide ( UgMain.c )
  46. pt_userguide ( UgMain.c )
  47. pt_userguide ( UgPopupmenus.c )
  48. pt_userguide ( UgPopupmenus.c )
  49. pt_userguide ( UgPopupmenus.c )
  50. pt_userguide ( UgPopupmenus.c )
  51. pt_wc_server ( PTWCServerMain.c )
  52. pt_wc_server ( PTWCServerMain.c )
  53. pt_wc_server ( PTWCServerMain.c )