AIT_MessageBox
- Organization of this page
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:
|
Value |
Description |
|---|---|
|
MB_ICONEXCLAMATION |
Displays an exclamation mark (!) icon in the message box. |
|
MB_ICONINFORMATION |
Displays an icon having circled i. |
|
MB_ICONQUESTION |
Displays a question mark (?) icon in the message box. |
|
MB_ICONSTOP |
Displays 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.
|
Value |
Description |
|---|---|
|
MB_ABORTRETRYIGNORE |
Displays a message box that has the Stop, Retry, and Ignore buttons. |
|
MB_OK |
Displays a message box that has only the OK button. |
|
MB_OKCANCEL |
Displays a message box that has the OK and Cancel buttons. |
|
MB_RETRYCANCEL |
Displays a message box that has the Retry and Cancel buttons. |
|
MB_YESNO |
Displays a message box that has the Yes and No buttons. |
|
MB_YESNOCANCEL |
Displays 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.
|
Value |
Description |
|---|---|
|
IDABORT |
You have chosen the Stop button. |
|
IDCANCEL |
You have chosen the Cancel button. |
|
IDIGNORE |
You have chosen the Ignore button. |
|
IDNO |
You have chosen the No button. |
|
IDOK |
You have chosen the OK button. |
|
IDRETRY |
You have chosen the Retry button. |
|
IDYES |
You 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 number |
Error code |
|---|---|
|
87 |
ERROR_INVALID_PARAMETER |