AIT_MessageBox

Description

Displays a specified message in a dialog box, waits for the user to click a button, and returns the value indicating a button selected by the user.

Format

integer AIT_MessageBox  (
 string strMessage,       // Message
 string strTitle          // Title
 [,integer nIconType]     // Icon type
 [,integer nMsgBoxType]   // Message box type
);

Parameters

strMessage (input)

Specify a message to be displayed in a message box.

strTitle (input)

Specify the title of a message box.

nIconType (input, optional)

Specify the type of icon to be displayed. This type must be one of the following values:

ValueDescription
MB_ICONEXCLAMATIONDisplays an exclamation mark (!) icon in the message box.
MB_ICONINFORMATIONDisplays an icon having circled i.
MB_ICONQUESTIONDisplays a question mark (?) icon in the message box.
MB_ICONSTOPDisplays a stop mark icon in the message box.

The default is the MB_ICONEXCLAMATION icon type.

nMsgBoxType (input, optional)

Specify a message box type, which must be one of the following values.

ValueDescription
MB_ABORTRETRYIGNOREDisplays a message box that has the Stop, Retry, and Ignore buttons.
MB_OKDisplays a message box that has only the OK button.
MB_OKCANCELDisplays a message box that has the OK and Cancel buttons.
MB_RETRYCANCELDisplays a message box that has the Retry and Cancel buttons.
MB_YESNODisplays a message box that has the Yes and No buttons.
MB_YESNOCANCELDisplays a message box that has the Yes, No, and Cancel buttons.

The default is the MB_OK message box type.

Return values

This API function returns the value indicating a button the user has selected, which is one of the values below.

ValueDescription
IDABORTYou have chosen the Stop button.
IDCANCELYou have chosen the Cancel button.
IDIGNOREYou have chosen the Ignore button.
IDNOYou have chosen the No button.
IDOKYou have chosen the OK button.
IDRETRYYou have chosen the Retry button.
IDYESYou have chosen the Yes button.

If a value other than the above has been returned, you can use AIT_GetLastError to acquire an extended error code. The following gives the error codes that AIT_GetLastError might return:

Extended error numberError code
87ERROR_INVALID_PARAMETER