But when I drag that script to an open chart the whole MT4 freezes and I have to close MT4 and reopen it again.
I have no idea if ShowWindow() is really the correct Win32 function to do that. I have looked in different C++ forums but maybe this function can't be used in MQL4.
But there is absolutely no command to minimize the window when using SendMessage(). Additionally I tried to find out how to get the state of a window (minimized, maximized, normal) but again without success.
GetWindowPlacement() might be a good idea but that goes way beyond my knowledge. I have absolutely no idea how to work with this WINDOWPLACEMENT structure. Examples are only given in C++ or C# and I can't get the solution there. Maybe it'snot possible with MQL4..
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I tried it this way now:
But when I drag that script to an open chart the whole MT4 freezes and I have to close MT4 and reopen it again.
I have no idea if ShowWindow() is really the correct Win32 function to do that. I have looked in different C++ forums but maybe this function can't be used in MQL4.
But there is absolutely no command to minimize the window when using SendMessage(). Additionally I tried to find out how to get the state of a window (minimized, maximized, normal) but again without success.
GetWindowPlacement() might be a good idea but that goes way beyond my knowledge. I have absolutely no idea how to work with this WINDOWPLACEMENT structure. Examples are only given in C++ or C# and I can't get the solution there. Maybe it'snot possible with MQL4..
https://msdn.microsoft.com/de-de/library/windows/desktop/ms633518(v=vs.85).aspx
This worked for me to minimize a chart window:
This worked for me to minimize a chart window:
MQL5 Update: