MessageBox

MessageBox displays a message box. The message box contains a message, a title, and predefined icons and push buttons.

ssReturn = MessageBox(ssMessage)
ssReturn = MessageBox(ssMessage, svStyles)

Return Value

ssReturn depends on the input parameters and can be one of the following strings:

Value Meaning
“ABORT” The “ABORT” push button was selected.
“CANCEL” The “CANCEL” push button was selected.
“IGNORE” The “IGNORE” push button was selected.
“NO” The “NO” push button was selected.
“OK” The “OK” push button was selected.
“RETRY” The “RETRY” push button was selected.
“YES” The “YES” push button was selected.

Parameters

ssMessage

ssMessage is a scalar string containing the message text. The text can contain newline character sequences "\n".

svStyles

svStyles is a vector with one or more of the following strings:

Value Meaning
“ABORTRETRYIGNORE” The message box contains three push buttons: Abort, Retry, and Ignore.
“APPLMODAL” The user must respond to the message box before continuing work. However, the user can move to the windows of other applications and work in those windows. Depending on the hierarchy of windows in the application, the user may be able to move to other windows within the application. All child windows of the parent of the message box are automatically disabled, but pop-up windows are not. MB_APPLMODAL is the default value if neither MB_SYSTEMMODAL nor MB_TASKMODAL is specified.
“SYSTEMMODAL” All applications are suspended until the user responds to the message box. Unless the application specifies MB_ICONHAND, the message box does not become modal until after it is created; consequently, the owner window and other windows continue to receive messages resulting from its activation. Use system-modal message boxes to notify the user of serious, potentially damaging errors that require immediate attention (for example, running out of memory).
“TASKMODAL” Same as MB_APPLMODAL except that all the top-level windows belonging to the current task are disabled. Use this flag when the calling application or library does not have a window handle available but still needs to prevent input to other windows in the current application without suspending other applications.
“DEFBUTTON1” The first button is the default button. Note that the first button is always the default unless MB_DEFBUTTON2, MB_DEFBUTTON3, or MB_DEFBUTTON4 is specified.
“DEFBUTTON2” The second button is a default button.
“DEFBUTTON3” The third button is a default button.
“ICONASTERISK” Same as MB_ICONINFORMATION.
“ICONEXCLAMATION” An exclamation point icon appears in the message box.
“ICONHAND” Same as MB_ICONSTOP.
“ICONINFORMATION” An icon consisting of a lowercase letter i in a circle appears in the message box.
“ICONQUESTION” A question mark icon appears in the message box.
“ICONSTOP” A stop-sign icon appears in the message box.
“OK” The message box contains one push button: OK.
“OKCANCEL” The message box contains two push buttons: OK and Cancel.
“RETRYCANCEL” The message box contains two push buttons: Retry and Cancel.
“SETFOREGROUND” The message box becomes the foreground window. Internally, Windows calls the SetForegroundWindow function for the message box.
“YESNO” The message box contains two push buttons: Yes and No.
“YESNOCANCEL” The message box contains three push buttons: Yes, No, and Cancel.

Example

* MessageBox("Can't read file");

id-1717671