API 文档 > Creo Parametric user interface > Object ProMenubarmenu > Function ProMenubarmenuPushbuttonAdd
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:
Synopsis
#include <ProMenuBar.h>
ProMenubarmenuPushbuttonAdd
(
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
*/
/* (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
The function successfully added a push button.
The specified message was not found in the message file.
a menubar entity with this name already exists.
The function failed to add a push button.
Sample Code References
User Guide References
这对您有帮助吗?