You are passing a double
double hThread = CreateThread(0, 0, myMessageBox(), 0, 0, 0); // ^^^^^^^^^^^^^^ this is a function call. double uninitializedDouble = myMessageBox(); double hThread = CreateThread(0, 0, uninitializedDouble, 0, 0, 0); // Same as.If you want to pass a function pointer you'd need to use
double hThread = CreateThread(0, 0, myMessageBox, 0, 0, 0); // ^^^^^^^^^^^^ pointer to a function.Except MT4 does NOT HAVE POINTERS so it will not compile!
You are not compiling "with a function," you are compiling using the the return value FROM a function.
There is no problem, except that you are hard of reading. You answered your own question 1) "I think is not possible without a dll." and 2) I confirmed it. What part of "MT4 does NOT HAVE POINTERS" was unclear?
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I tried with this:
But I can´t create a new thread, I think is not possible without a dll.
myMessaBox is called from the current thread from myMessageBox() not from CreateThread