MQL4 Reference
Common functions
MessageBox
| int MessageBox( |
string text=NULL, string caption=NULL, int flags=EMPTY) |
The MessageBox function creates, displays, and operates message box. The message box contains an application-defined message and header,
as well as a random combination of predefined icons and push buttons. If the function succeeds, the returned value is one of
the MessageBox return code values. The function cannot be called from custom indicators since
they are executed within interface thread and may not decelerate it.
Parameters:
| text |
- |
Optional text that contains the message to be displayed. |
| caption |
- |
Optional text to be displayed in the header of the dialog box. If this parameter is NULL, the expert name will be displayed in the header. |
| flags |
- |
Optional flags that determine the type and behavior of the dialog box. They can represent a conbination of flags from the following groups. |
Sample:
#include <WinUser32.mqh>
if(ObjectCreate("text_object", OBJ_TEXT, 0, D'2004.02.20 12:30', 1.0045)==false)
{
int ret=MessageBox(" ObjectCreate() function returned the "+GetLastError()+" error\nContinue?", "Question", MB_YESNO|MB_ICONQUESTION);
if(ret==IDNO) return(false);
}
// continue
|
|
|