Use of ProMenubuttonActionSet() Final Arguments
The two last arguments of ProMenubuttonActionSet() are app_data, of type ProAppData and app_int, of type integer. These arguments are passed directly to your callback function when it is invoked. Because Creo TOOLKIT and do not look at these arguments, you can use them for any information that you want to pass to or from your function.
Example 9: Creating a Menu that Selects a Value uses the final argument of
ProMenubuttonActionSet() to distinguish between several menu buttons that share the same command function. Inside the command function, this value appears as the second argument. It is used to determine which button was selected and then perform the appropriate action. The command function does not use the fourth argument of
ProMenubuttonActionSet(), but includes a dummy first argument of type
ProAppData to match it, so that the second argument is received correctly.