pUserMessage
pUserMessage
Output an application message.
Syntax
pUserMessage ( in vlOperation,
in vlMessCode,
in vlMessType,
in vlMessStyle,
in vlDefButton,
in vlMessage,
inout vlResponse )
Parameters
vlOperation | The current operation. |
vlMessCode | The message number for the message to be displayed. |
vlMessType | The message type (‘E’ and ‘S’ for error, ‘W’ for warning, ‘I’ for information, and ‘Q’ for questions). |
vlMessStyle | The message style. |
vlDefButton | The default button number. |
vlMessage | The message text. |
vlResponse | The response made by the user (the label on the selected button). |
Comments
The pUserMessage command uses $MessageBox to display a message.
The Framework provides the ability to define messages in many different languages. Language for a message is defined by the ApplMessLang field in ApplMessages and the ApplMessTitleLang field in ApplMessTitles. For example, the entries supplied with DC have these fields set to “E” to indicate they are in English. You can add additional entries in other languages and use any language code you like.
When pUserMessage is called, the global variable $Language is assumed to be set to be the language code you wish to use. If $Language is $NULL, it is set to “E”.
The message window caption is found in ApplMessTitles by looking for ApplMessOperation equal to vlOperation and ApplMessLang equal to $Language. If no entry is found, a default caption is used.
The actual message is looked up in ApplMessages using vlMessCode and $Language. The message text can contain parameter indicators in the form &1, &2, . . . , &10. These indicators are replaced with the current values of the associated parameters set by calls to pUserMsgParm.
The message type is taken from vlMessType if vlMessType is not blank. Otherwise, the type is taken from the ApplMessages record. The message style is a number that identifies the style of message window (how many buttons, labels, etc.). See the Zim documentation ($MessageBox) for more details. The message style is taken from vlMessStyle if vlMessStyle is not blank. Otherwise, the style is taken from the ApplMessages record.
The default button is a number that identifies the button in the message window that is the default button. For more information, see $messagebox. The default button is taken from vlDefButton if vlDefButton is not zero. Otherwise, the default button is taken from the ApplMessages record.
The message text is taken from vlMessage if vlMessage is not blank. Otherwise, the message text is taken from the ApplMessages record.
The label on the button selected by the user is returned in vlResponse.
To introduce a carriage return into the message, use the sequence
r
embedded in the text of the message. For example
This is the first line r and this is the second line
would be displayed as
This is the first line
and this is the second line
This convention is not valid, however, if the message text is taken from vlMessage.
Uses
Used By
See Also