| Arguments:
Message - containing the message to be displayed.
Title - containing the title of the dialog. This parameter
is optional.
Style - Specifies the contents and behavior of the
message box. This parameter can be a combination of flags
from the following groups of flags. Parameters can be combined
by operator OR or |. To indicate the buttons
displayed in the message box, specify one of the following
values. This parameter is optional.
| Value |
Meaning |
| MB_ABORTRETRYIGNORE |
The message box contains three push buttons:
Abort, Retry, and Ignore. |
| MB_OK |
The message box contains one push button:
OK. This is the default. |
| MB_OKCANCEL |
The message box contains two push buttons:
OK and Cancel. |
| MB_RETRYCANCEL |
The message box contains two push buttons:
Retry and Cancel. |
| MB_YESNO |
The message box contains two push buttons:
Yes and No. |
| MB_YESNOCANCEL |
The message box contains three push buttons:
Yes, No, and Cancel. |
To display an icon in the message box, specify one of
the following values.
To indicate the default button, specify one of the following
values.
| Value |
Meaning |
| MB_DEFBUTTON1 |
The first button is the default button.
MB_DEFBUTTON1 is the default unless MB_DEFBUTTON2,
MB_DEFBUTTON3, or MB_DEFBUTTON4 is specified. |
| MB_DEFBUTTON2 |
The second button is the default button. |
| MB_DEFBUTTON3 |
The third button is the default button. |
| MB_DEFBUTTON4 |
The fourth button is the default button. |
Return value:
If the function succeeds, the return value is one of the
following menu-item values.
| Value |
Meaning |
| IDABORT |
Abort button was selected. |
| IDCANCEL |
Cancel button was selected. |
| IDCONTINUE |
Continue button was selected. |
| IDIGNORE |
Ignore button was selected. |
| IDNO |
No button was selected. |
| IDOK |
OK button was selected. |
| IDRETRY |
Retry button was selected. |
| IDTRYAGAIN |
Try Again button was selected. |
| IDYES |
Yes button was selected. |
If a message box has a Cancel button, the function
returns the IDCANCEL value if either the ESC key is pressed
or the Cancel button is selected. If the message box
has no Cancel button, pressing ESC has no effect.
If the function fails, the return value is False.
|