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
symr:
- Maximize window wont work if u close it when its maximized and than reopen it
- The code not working properly in multi monitor systems, because the GetWindowRect returns negative values eg.: {-1127, 371,-553,679} sorry for that, NVM, it's my fault, working great with multiple mons...
- Sometimes some version of MT got a localization bug, and some button not always got a same caption (eg.: Cancel - (hungarian : "Mégse"))
- i think try to get a ControlID via GetControlID API and we wont need to set the localization button captions. MT doesnt shuffle control IDs.
Hi! I'm a bit confused.
- Everything works fine with maximized windows for me since the last fix (the bug with wrong char in GV name you have spotted).
- I don't have multiple monitors so unfortunately I can't check anything that way. Should the piece of code you posted be incorporated, or what do you meant with it?
- I will probably have to find some other way to enumerate the controls but what "GetControlID" function do you mean? It rather seems it's something related to ASP.NET or .NET Framework, not the 'basic' Win32 API.
MT4 logically knows the IDs and handles of controls since it's the app that created them. We don't. All we need to know are the HANDLES or IDs.
I haven't found any other way of getting into that. I don't know how could I use something like EnumerateChildWindows() from within mql4 since it deals with a pointer to application-defined callback function. The only way I'm thinking of at this moment is the ugly way:
Another way (an idea of this moment ;-) could be collecting the handles from coordinates. They happen to stay the same, relative to lower right corner of the parent box. This would solve the button issues. But even in this case, we have to know the Input tab handle to determine if it's a MT4 input box at all !
Please note I'm an absolute newbie in coding; this is the third mql4 thing I coded, and my first touch ever with the Windows API. Perhaps there's a simple way of getting the handles but I just don't see it. I will be very glad for any hint on how to do it. Maybe I'm starting to see a possibility as I'm typing this post.. let me try ;-))
Thanks for your input! Cheers :-)
Hi!
- Yes - no way to use EnumerateChildWindows().
- Yes - GetControlID - i thought GetDlgCtrlID()
- i am waiting moderator approval, for another version of my Tester Control library. There is a code to find an expert window, ofc u dont know the exact name of the experts but u can identify the window by "sub windows/controls..." the parent handle is the mainwindow(terminal) parent. i dont know u use it or not just recommend: SpyWindows
Hi!
i dont know u use it or not just recommend: SpyWindows
Hi, I'm using Window Detective (from SourceForge). I dived into it once more and found a way out! You have put me on the right track with the Control IDs, so we can say goodbye to all locale trouble! I have checked five MT4 builds from #218 (2008) to #402 (recent) and the IDs really don't change :-) New version already published, it was so simple:
CID_XXXX are constant across all builds I could test ;-)
Thanks for cooperation and kick into right direction!
More bug reports, please :-P ;-)))
(MT4 is deprecated in the near of future :D)
I do not want to take away the glory from you, but is it possible u implement this code for MT5? :P
(MT4 is deprecated in the near of future :D)
A stand-alone native Windows tray utility will be a much better solution. I don't know MT5, maybe there's no need for it (?!). The best would be if MetaQuotes spent 10 minutes more time when releasing new MT4 build and make the windows resizable. Programming efforts? Near to none. Security/stability risk? NONE.
Edited & posted a fix three weeks ago:
2011.07.10: bugfix: indicator input boxes opened from within indicators list (Ctrl+I) couldn't be found.
NOT PUBLISHED until today (?), article was 'ready for publishing' all the time so I deleted it and submitted once more, let's see.
latest version always here: http://www.forexfactory.com/showthread.php?t=299017
Very great job. Thanks for your input!