Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ParameterDescription
ownerwindowThe window ID of the window to use as a parent. This parameter can be null to use the screen as a parent. Typically, this parameter is @window. For MDI children, pass the frame ID.
textPass the message text. Multiple lines are delimited by CR/LF. CR/LF can be coded as \0D0A\ or char(13):char(10). The constant MSG_NL$ is defined in the insert record Message_Box_Equates and can be used to separate multiple lines of text.
titlePass the title for the message.
optionsThe options are defined in the insert record Message_Box_Equates under the sections "button arrangement", "default button", and "message icon". To specify multiple options, add the options together. For example:

...

The return values from Message_Box are defined in the insert record Message_Box_Equates. Each button (OK, CANCEL, YES, NO, ABORT, RETRY, IGNORE) returns a different value.

See also

Msg()

Example: Yes/No/Cancel, Default to 'No' Button

Code Block
declare function Message_Box
$insert Message_Box_Equates
retval = Message_Box( @window ,'Yes/No/Cancel, default to No',|
         'Please Confirm', MSG_BTN_YESNOCAN$ + MSG_DEFAULT2$)
if retval = MSG_RET_YES$ then
    *  user clicked "YES', so do processing, then display message
    retval = Message_Box (@window, 'Processing completed!', 'Done!', MSG_BTN_OK$)
end

 

 

Example: Message with Information Icon

...