• | The type of message to be displayed. |
• | The text to display as the title of the dialog. If you want to support displaying localized text, use the message files and the function ProMessageToBuffer() to generate this string. Message files are described later in this chapter. |
• | The message text to be displayed in the dialog. If you want to support displaying localized text, use the message files and function ProMessageToBuffer() to generate this string. Message files are described later in this chapter. |
• | ProArray of possible button identifiers for the dialog. |
• | The identifier of the default button for the dialog. |
• | Displaying and clearing messages |
• | The text message file |
|
|
|
|
|
|
|
|
|
|
• | The first argument is the name (as a wide string) of the message file. The name must include the file extension, but not the path. See the section Text Message File Format and Restrictions. |
• | The second argument, instead of being a format string, is a keyword used to look up the format string in the message file. |
• | The subsequent arguments for the values inserted into the format string are pointers, not values. These values can be data inserted into the message or default values for the data to be read from user input. See the section Getting Keyboard Input for more information. |
• | Although the list of arguments for the values is variable in number, there is a maximum of 9. See Contents of the Message File for more information on using these arguments with a message format. |
• | target_dialog—The window on which the balloon is displayed |
• | target_component—The component that is pointed by the balloon |
• | The name of the file must be 30 characters or less, including the extension. |
• | The name of the file must contain lowercase characters only. |
• | The file extension must be three characters. |
• | The version number must be in the range 1 to 9999. |
• | All message file names must be unique, and all message key strings must be unique across all applications that run with Creo Parametric. Duplicate message file names or message key strings can cause Creo Parametric to exhibit unexpected behavior. To avoid conflicts with the names of Creo Parametric or Creo TOOLKIT application message files or message key strings, PTC recommends that you choose a prefix unique to your application, and prepend that prefix to each message file name and each message key string corresponding to that application. |
• | The current Creo Parametric directory |
• | The directory text under the directory named in the text_dir statement in the registry file (protk.dat). |
1. | A string that acts as the keyword to identify the message when you call ProMessageDisplay() This keyword must be unique for all Creo Parametric messages. |
2. | A string that will be substituted for the first string when you call ProMessageDisplay(). This string acts like the format string in a printf() statement. By modifying this line in the message file, you can modify the text of the message without modifying your C code. |
3. | The translation of the message into another language (can be blank). |
4. | An intentionally blank line reserved for future extensions. |
• | The conversion specifications (%d, %s, and so on) must include an argument number corresponding to the position of that argument in the subsequent list (starting at 0). For example, instead of %d, %s, you must have %0d,%1s, and so on. If you want to specify a field width, put it in parentheses between the position number and the type specifier; for example, %0(5.3)f. |
• | The separator ||| between message text and a conversion specification signifies that the conversion specification is for a default value for user input. This default value will appear in the text box created using the keyboard input functions, such as ProMessageIntegerRead(). Refer to Using Default Values for more on default values. |
• | The conversion character w is available for wide strings. |
• | You do not need the character constant (\n) at the end of the format. Creo Parametric automatically inserts a new line when necessary. |
Conversion Character
|
Data Type
|
---|---|
f
|
Float (or double)
|
d
|
Decimal integer
|
s
|
Ordinary string (or type char[])
|
w
|
Wide character strings
|
e
|
Exponential
|
g
|
Either float or exponential, as appropriate
|
• | Prompt—the Creo Parametric message displayed is preceded by a green arrow. The user must respond to this message type (to either input information, accept the default value offered, or cancel the application). Without such action, no progress can be made. The response may be either textual or in the form of a selection. The classification code for prompt messages is %CP. |
• | Info—the Creo Parametric message displayed is preceded by a blue dot. This message type contains information such as user requests or feedback from
either Creo Parametric or the Creo TOOLKIT application. The classification code for prompt messages is %CI. Note
Do not classify as Info any message which informs users of a problem with an operation or process. These messages should be
classified as Warnings.
|
• | Warning—the Creo Parametric message displayed is preceded by a triangle containing an exclamation point. Warnings alert the user to situations which may lead to potentially erroneous situations at a later stage, for example, possible process restrictions imposed or a suspected data problem. However, warnings do not prevent or interrupt task completion, nor should they be used to indicate a failed operation. Warnings only caution the user that the operation has been completed, but may not have been performed in a completely desirable way. The classification code for prompt messages is %CW. |
• | Error—the Creo Parametric message is preceded by a broken square. This message type informs the user when a required task was not successfully completed. It may or may not require intervention or correction before work can continue, depending on the application. Whenever possible, provide a path to redress this situation. The classification code for prompt messages is %CE. |
• | Critical—the Creo Parametric message displayed is preceded by a red X. This message type informs the user of extremely serious situations, especially those which could cause the loss of user data. Options for redressing the situation (if available) should be provided with the message. The classification code for prompt messages is %CC. |
• | ProMessageToBuffer() |
• | ProMessageWstringbufferAlloc() |
• | ProMessageDisplay() |
• | ProCmdDesignate() |
Enter a double: |||3.0
Enter any integer: |||%0d