Category Menu manager menus, Object ProMenubutton

Function ProMenubuttonPreactionSet


Description
Enables you to interpose your own function into an existing Creo Parametric menu button. When the user selects that button, your function is called first, instead of the Creo Parametric function. The Creo Parametric function may or may not get called afterwards, depending on what value your functions returns (0 for success and 1 for failure).

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

Note that this has the same arguments as ProMenubuttonActionSet(), and, like that function, modifies the Creo Parametric definition of the menu. Therefore, you must call this function after ProMenuFileRegister(), which loads the menu into memory.

Synopsis
#include <ProMenu.h>
ProErrorProMenubuttonPreactionSet(
ProMenuName menuname
/* (In)
The name of the menu
*/
ProMenubuttonName button
/* (In)
The name of the menu button
*/
ProMenubuttonAction action
/* (In)
The callback function to be called before the Creo Parametric command
*/
ProAppData app_data
/* (In)
The general application data passed to the callback function when it is called
*/
int app_int
/* (In)
The integer application data passed to the callback function when it is called
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully set the pre-action.
PRO_TK_GENERAL_ERRORThere was a general error and the function failed.
See Also
ProMenubuttonActionSet
ProMenuFileRegister

Manual References:

  1. Pro/DEVELOP to Creo Toolkit Function Mapping: Equivalent Pro/DEVELOP Functions
  2. User Interface: Menus, Commands, and Popupmenus: New Menus
  3. User Interface: Menus, Commands, and Popupmenus: New Menus
  4. User Interface: Menus, Commands, and Popupmenus: New Menus

Sample Code References:

  1. pt_examples ( TestMenu.c )
  2. pt_userguide ( UgMenuConfirmGet.c )