MessageBox() <---

 

I'm sorry to say that my Japanese english is not appropriate.

WinUser 32 stops working when MessageBox function is called from.

Please let me know how to run Win32 with MessageBox function.

otherwise, is there any alternative function for MessageBox's one.

I look forward to hearing from you. Thank you.

 

dll is allowed in Metatrader's settings?

Also you can use

bool IsDllsAllowed( ) function to check it:

#import "user32.dll"

int MessageBoxA(int hWnd, string szText, string szCaption,int nType);

...

...

if(IsDllsAllowed()==false)

{

Print("DLL call is not allowed. Experts cannot run.");

return(0);

}

// expert body that calls external DLL functions

MessageBoxA(0,"an message","Message",MB_OK);

Also open MetaEditor, write

MessageBox

and check all the links as a help:

Files:
 

And you can go to Metaquotes website to search about MessageBox.

I saw some script here with MessageBox function:

/

/----

#include

#include [/CODE]

and

[CODE]msg = msg +

" Slippage " +DoubleToStr(Slippage, 0) +"\n"+

"Risk amount " +DoubleToStr(RiskAmount, 2) +" " +AccountCurrency()+

" ("+DoubleToStr(100.0 * RiskAmount / AccountFreeMargin(), 2)+"%)"+" ?";

if(MessageBox(msg, "Buy/Sell script", MB_YESNO|MB_ICONEXCLAMATION) != IDYES) {

return(1);

}

And on this page you will see description of this function and example: Common Functions - Standard Functions - MQL4 Tutorial

Or maybe ... you simple forgot to add

#include

About alternative function so please read this article:

https://www.mql5.com/en/articles/1448

 

And go to Metaquotes website MessageBox - MQL4: search and check everything:

Files:
 
 

I do not know sorry ...

You can use alternative functions for example.

 

The nature of any MessageBox call in any windows application is to halt execution of the program until some user input is given. If you want execution to continue you might want to look at writing a comment or print statement.

Lux

 

Thank you very mauch!

Gentlemen,

I wish to express my deepest appreciation for your prompt reply and help.

If I have any further question, I shall be grateful to you if you would kindly answer to me.

Best regards,