Category Menu manager menus, Object ProMenu

Function ProMenuStringsSelect


Description
Sets up a menu containing buttons defined by an array of strings. The function makes the menu active, closes it after a specified number of selections (or quit), and returns a list of the selected strings.

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

This function is intended for menus that depend on run-time data. You do not need to define a menu file for this type of menu, and you do not attach actions to its buttons using ProMenubuttonActionSet().

Synopsis
#include <ProMenu.h>
ProErrorProMenuStringsSelect(
ProName title
/* (In)
A wide string containing the menu title to be displayed.
*/
wchar_t** strings
/* (In)
A list of wide strings defining the menu buttons, terminated by an empty string. Individual strings can be no longer than PRO_NAME_SIZE-1.
*/
int max_count
/* (In)
The maximum number of selections allowed. Use the value PRO_VALUE_UNUSED for an unlimited number of selections.
*/
wchar_t** help
/* (In)
A list of wide strings defining the one-line help strings for the menu buttons.
*/
wchar_t*** selected
/* (Out)
The wide strings selected by the user. The function allocates memory for these strings, and reuses the memory on subsequent calls.
*/
int* n_selected
/* (Out)
The number of strings selected.
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully set up the menu.
PRO_TK_USER_ABORTThe user selected no strings (selected Quit, or Done with no strings selected, or some other menu).
See Also
ProMenubuttonActionSet

Manual References:

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

Sample Code References:

  1. pt_examples ( TestProcstep.c )
  2. pt_examples ( TestGenedata.c )
  3. pt_examples ( TestGenedata.c )
  4. pt_examples ( TestDtlsyminst.c )
  5. pt_examples ( TestLayer.c )
  6. pt_examples ( TestView.c )
  7. pt_examples ( TestMenu.c )
  8. pt_examples ( UtilMfgNew.c )
  9. pt_examples ( UtilRoute.c )
  10. pt_examples ( UtilRoute.c )
  11. pt_examples ( TestRelation.c )
  12. pt_examples ( TestPartMaterial.c )