anyone on this forum ever faced the same issue with MessageBoxW?
If you are using MessageBoxW successfully, can you please verify my code? what i'm doing wrong?
I 've put it on a script, but there is nothing with it
you meant it worked? or didn't even show the box?
you meant it worked? or didn't even show the box?
heeh sorry, I updated my message before I see your answer - well, it is working ok here
okay, can you please share your code examples,
1. how are u importing the routines
2. how you are invoking
It is an empty script, with the #import above and the MessageBoxW() inside OnStart() and that 's it. Maybe the error is somewhere else? Is it happening when changing TFs? Of course, it could be a problem In MetaTrader or something
Hi,
the problem is happening whenever the buttons are pressed (OK, CANCEL, CLOSE etc.) for the first times. It no longer pops up the messageboxs.
try this on a live chart :
/// #import first //then invoke in an indicator's Oncalculate int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { MessageBoxW(NULL,"a message","caption",NULL); }
I put it there and somewhat it works. I mean,
if the indicator is loaded in the chart when I launch MetaTrader, the log prints "DLL loading is not allowed", but the indicator works ok. If I load the indicator on an empty chart, I do not get that message on the log but no problem as well.
A remark, maybe you are missing the message box, as it opens a new icon in the Windows task bar? It may be in the background I mean. Despite that, I get no problems, but maybe the issue you are having has to do with the fact that indicators are not accepting blocking functions? I am in Windows 10 64 bit fwiw
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
message box showing okay. But when i click "ok" /close the box, it stops working .
I guess its due to some parameter types mismatch, but not sure. Tried exact data types, but the issue still not solved.
the error its reporting:
Stack Damaged -> check dll function call in xyz.mq4 (line : xyz,zyx)