ObjectDCL Banner

MessageBox Method

Description

This method displays a standard windows message box. The message box contains a message and title, plus any combination of predefined icons and push buttons.

Parameters

sMessage
String identifying the message to display.
sTitle
String identifying the title to display.
nButtonsStyle
Integer a flag that controls which button(s) will be displayed in the message box.
  • 1 - Three push buttons: Abort, Retry, and Ignore, with Abort as default.
  • 2 - One push button: OK. This is the default if no value is entered.
  • 3 - Two push buttons: OK and Cancel, with OK as default.
  • 4 - Two push buttons: Retry and Cancel, with Retry as default.
  • 5 - Two push buttons: Yes and No, with Yes as default.
  • 6 - Three push buttons: Yes, No, and Cancel, with Yes as default.
  • 11 - Three push buttons: Abort, Retry, and Ignore, with Retry as default.
  • 13 - Two push buttons: OK and Cancel, with Cancel as default.
  • 14 - Two push buttons: Retry and Cancel, with Cancel as default.
  • 15 - Two push buttons: Yes and No, with No as default.
  • 16 - Three push buttons: Yes, No, and Cancel, with No as default.
  • 21 - Three push buttons: Abort, Retry, and Ignore, with Ignore as default.
  • 26 - Three push buttons: Yes, No, and Cancel, with Cancel as default.
nImageStyle
Integer is a flag that controls which icons if any will be displayed in the message box.
  • 0 - No Icon will be displayed. This is the default.
  • 1 - An exclamation point icon is displayed in the message box.
  • 2 - An icon consisting of a lowercase letter 'i' in a circle is displayed
  • 3 - A question mark icon is displayed in the message box.
  • 4 - A stop sign icon is displayed in the message box.
bShowHelpButton
Boolean specifying if a help button should be displayed.

Return Values

  • Integer indicating the user's choice.
    • 1 - OK button was selected.
    • 2 - Cancel button was selected.
    • 3 - Abort button was selected.
    • 4 - Retry button was selected.
    • 5 - Ignore button was selected.
    • 6 - Yes button was selected.
    • 7 - No button was selected.
    • 9 - Help button was selected.
  • AutoLISP Syntax

    CopyCode imageCopy Code
    (Odcl_Control_MessageBox 
    		sMessage [as String]
    		sTitle [as String]
    		[Optional] nButtonsStyle [as Integer]
    		[Optional] nImageStyle [as Integer]
    		[Optional] bShowHelpButton [as Boolean])

    Example

    CopyCode imageCopy Code
    ; Display a message box
    (Odcl_Control_MessageBox "The file already exists. Do you want to overwrite?" "Saving File")