I haven't tried it, but it should be possible.
My thought is you would create both panels during OnInit() and simply hide the 2nd panel until you needed it.
Pseudo-code, not tested, not complete:
int OnInit() { // panel 1 ExtDialog1.Create(...); ExtDialog1.Run(); // panel 2 ExtDialog2.Create(...); ExtDialog2.Hide(); ExtDialog1.Run(); } void OnDeinit(const int reason) { ExtDialog1.Destroy(reason); ExtDialog2.Destroy(reason); } . . . then in your code for the checkbox . . . if ( showing ) { ExtDialog2.Hide(); } else { ExtDialog2.Show(); }
I haven't tried it, but it should be possible.
My thought is you would create both panels during OnInit() and simply hide the 2nd panel until you needed it.
Pseudo-code, not tested, not complete:
Thanks.
I am facing these kinds of problems.
Actually, my ea has 5 CDialog object
Yes, I had testing almost thousands of times.
Finally. my conclusion is
You can have multiple CAppDialog, but you can only initializing them on the method of init()
If you attempt to initialize a CAppDialog after EA had initialized. you will fail to initialize
If you want to initialize a dialog instantly. temporarily. Like create a message dialog, you can create a new base include and inherited from CDialog instead of CAppDialog.
The difference between CAppDialog and CDialog is, CAppDialog has a method which is run() and once your register your own CAppDialog on OnChartEvent, you could handle minimized, the event of controls, such as ListView, RadioGroup, base move dialog XY by drag... etc
These functions are not available for CDialog except Buttons click and base move dialog XY by drag.
Finally, the nasty problem is multiple CAppDialog, the event between controls of them will respond at the same time. My EA had only one dialog which includes controls to change things I wish to.
and the others are just only function to show some info. so I choose to create a CAppDialog and other multiple CDialog. Now the problem is just not as nasty as before...
Hope better solutions come out..
.
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
Is it possibel to have 2 CPanelDialog on a chart? i mean i have a main CPanelDialog to have all the conditions of an EA, when i "check" the check box "view status", another CPanelDialog will appear with all status of the ea within it, the problem is when i "uncheck" the box function would be to remove the 2nd CPanelDialog in which it will not work not unless you close or unload both CPanelDialog.
I hope someone can help me with this one.
Thanks...