Apologies for the newbie question. I've worked as a programmer for years but am
just now learning MQL4. I'm having trouble using MessageBox and PlaySound. My EA
looks like this:
int start() {
Print("Error number ",GetLastError());
MessageBox("Testing");
Print("Error number ",GetLastError());
PlaySound("alert2.wav");
Print("Error number ",GetLastError());
return(0);
}
The journal shows this:
Error number 4059
Error number 4059
Error number 0
Error 4059 is ERR_FUNCTION_NOT_ALLOWED_IN_TESTING_MODE. I can't imagine that MessageBox
and PlaySound would be disabled for testing...would they? I've heard of problems
with MessageBox on Windows 2003, but I'm using XP, and it looks like that problem
was fixed anyway.
int start() {
Print("Error number ",GetLastError());
MessageBox("Testing");
Print("Error number ",GetLastError());
PlaySound("alert2.wav");
Print("Error number ",GetLastError());
return(0);
}
The journal shows this:
Error number 4059
Error number 4059
Error number 0
Error 4059 is ERR_FUNCTION_NOT_ALLOWED_IN_TESTING_MODE. I can't imagine that MessageBox and PlaySound would be disabled for testing...would they? I've heard of problems with MessageBox on Windows 2003, but I'm using XP, and it looks like that problem was fixed anyway.
Thanks :-)
Mango