Category Creo Parametric user interface, Object ProMessage

Function ProMessageToBuffer


Description
Places the translated contents of a formatted message into the specified output buffer. This function works just like ProMessageDisplay(), except the message is written to a string instead of the message area.

This function takes 0 to 10 additional arguments to be substituted for conversion specifiers in the text of the message, similar to printf().

NOTE:

This is an exception to the Creo Parametric TOOLKIT standard of putting output arguments after input arguments, due to the variable number of input arguments.

Replacement in Object TOOLKIT: pfcBaseSession::GetMessageContents
pfcBaseSession::GetLocalizedMessageContents
Synopsis
#include <ProMessage.h>
ProErrorProMessageToBuffer(
ProLine translated_msg
/* (Out)
The formatted and translated message
*/
ProFileName file_name
/* (In)
The name of the file that contains the message
*/
ProCharLine message_name
/* (In)
The name of the message in the file
*/
...
/* (In)
0 through 9 values of input variants.
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully printed the message.
PRO_TK_E_NOT_FOUNDThe specified message file was not found.
PRO_TK_CANT_OPENThe system could not read the message file.
PRO_TK_MSG_NOT_FOUNDThe specified message was not found in the message file.
PRO_TK_MSG_NO_TRANSThe message text (in the current language of the user interface) was not found.
PRO_TK_MSG_FMT_ERRORThere was a format error in the message text.
PRO_TK_MSG_TOO_LONGThe message was longer than (PRO_LINE_SIZE - 1) characters and has been truncated to fit.
PRO_TK_E_FOUNDThe specified message was not found in memory and the message file was read previously. This may indicate that there are two different message files with the same name; avoid this problem by including the application name in the file name.
PRO_TK_GENERAL_ERRORThe message was not printed.

Manual References:

  1. Pro/DEVELOP to Creo Toolkit Function Mapping: Equivalent Pro/DEVELOP Functions
  2. User Interface: Menus, Commands, and Popupmenus: Checking the Access State of a Popup Menu Item
  3. User Interface: Messages: Writing a Message Using a Popup Dialog
  4. User Interface: Messages: Writing a Message to an Internal Buffer
  5. User Interface: Messages: Writing a Message to an Internal Buffer

Sample Code References:

  1. pt_examples ( TestMessage.c )
  2. pt_install_cxx ( TestInstall.cxx )
  3. pt_install_cxx ( TestInstall.cxx )
  4. pt_install_test ( TestInstall.c )
  5. pt_install_test ( TestInstall.c )
  6. pt_userguide ( UgModelCheck.c )
  7. pt_userguide ( UgModelCheck.c )
  8. pt_userguide ( UgModelCheck.c )
  9. pt_userguide ( UgModelCheck.c )
  10. pt_userguide ( UgModelCheck.c )
  11. pt_userguide ( UgModelCheck.c )
  12. pt_userguide ( UgModelCheck.c )
  13. pt_userguide ( UgModelCheck.c )
  14. pt_userguide ( UgModelCheck.c )
  15. pt_userguide ( UgModelCheck.c )
  16. pt_userguide ( UgModelCheck.c )
  17. pt_userguide ( UgPopupmenus.c )
  18. pt_userguide ( UgPopupmenus.c )
  19. pt_userguide ( UgPopupmenus.c )
  20. pt_userguide ( UgPopupmenus.c )
  21. pt_userguide ( UgPopupmenus.c )
  22. pt_userguide ( UgPopupmenus.c )
  23. pt_userguide ( UgPopupmenus.c )
  24. pt_userguide ( UgPopupmenus.c )
  25. pt_userguide ( UgPopupmenus.c )
  26. pt_userguide ( UgPopupmenus.c )
  27. pt_userguide ( UgPopupmenus.c )
  28. pt_userguide ( UgPopupmenus.c )
  29. pt_userguide ( UgPopupmenus.c )
  30. pt_userguide ( UgPopupmenus.c )
  31. pt_userguide ( UgPopupmenus.c )
  32. pt_userguide ( UgPopupmenus.c )
  33. pt_userguide ( UgPopupmenus.c )
  34. pt_userguide ( UgPopupmenus.c )
  35. pt_userguide ( UgMessageWindowUse.c )
  36. pt_userguide ( UgUIMessageDisplay.c )
  37. pt_userguide ( UgSolidInfoMass.c )