int MessageBoxW(uint hWnd,string lpText,string lpCaption,uint uType);
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)
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?
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
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)
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