Category Creo Parametric user interface, Object ProMenubarmenu

Function ProMenubarmenuChkbuttonAdd


DEPRECATED: Since Creo 1
SUPERSEDED BY: ProCmdDesignate
Description
Note: This API is deprecated. Use ProCmdDesignate() to designate a check button and Customize UI dialog to add it in Creo Parametric Ribbon UI.

Adds a new check 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 action. Subsequent calls to this function for a previously loaded check 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.

Synopsis
#include <ProMenuBar.h>
ProErrorProMenubarmenuChkbuttonAdd(
ProMenuItemName parent_menu
/* (In)
The name of the parent menu
*/
ProMenuItemName check_button_name
/* (In)
The name of the check button (must be unique)
*/
ProMenuItemLabel check_button_label
/* (In)
The label of the check button
*/
ProMenuLineHelp one_line_help
/* (In)
The one-line help for the menu
*/
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 checkbutton before or after the neighbor item; PRO_B_TRUE specifies after.
*/
uiCmdCmdId option_id
/* (In)
The identifier of the option attached to the check 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 check 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 check 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_examples ( TestMenubar.c )
  2. pt_examples ( TestMenubar.c )