Creates and shows a message box and manages it. A message box contains a message and header, any combination of predefined signs and command buttons.
- Parameters
-
text | Text, containing message to output. |
caption | Optional text to be displayed in the box header. If the parameter is empty, Expert Advisor name is shown in the box header. |
flags | Optional flags defining appearance and behavior of a message box. Flags can be a combination of a special group of flags:
MB_OK | Message window contains only one button: OK. Default |
MB_OKCANCEL | Message window contains two buttons: OK and Cancel |
MB_ABORTRETRYIGNORE | Message window contains three buttons: Abort, Retry and Ignore |
MB_YESNOCANCEL | Message window contains three buttons: Yes, No and Cancel |
MB_YESNO | Message window contains two buttons: Yes and No |
MB_RETRYCANCEL | Message window contains two buttons: Retry and Cancel |
MB_CANCELTRYCONTINUE | Message window contains three buttons: Cancel, Try Again, Continue |
|
- Returns
- If the function is successfully performed, the returned value is one of values of MessageBox() return codes:
IDOK | "OK" button has been pressed |
IDCANCEL | "Cancel" button has been pressed |
IDABORT | "Abort" button has been pressed |
IDRETRY | "Retry" button has been pressed |
IDIGNORE | "Ignore" button has been pressed |
IDYES | "Yes" button has been pressed |
IDNO | "No" button has been pressed |
IDTRYAGAIN | "Try Again" button has been pressed |
IDCONTINUE | "Continue" button has been pressed |
Note: The function can't be called from custom indicators, because indicators are executed in the interface thread and shouldn't slow it down.