Discussion of article "Adding a control panel to an indicator or an Expert Advisor in no time" - page 3
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
Using the PanelDialog2.mqh file from the article as an example:
This file creates the elements for a dialogue panel. The panel trait is the CDialog class.
Thanks!
I'll try it with CDialog now, but I still don't understand how it should work: the button becomes visible immediately after creation, should it disappear and jump to CDialog?
Thanks!
I'll try it with CDialog, but I still don't understand how it should work: the button becomes visible immediately after creation, should it disappear and jump to CDialog?
Thanks!
I'll try it with CDialog, but I still don't understand how it should work: the button becomes visible immediately after creation, should it disappear and jump to CDialog?
On the example of PanelDialog2.mqh file from the article:
This file creates elements for a dialogue panel. The sign of the panel is the CDialog class.
Yes, it works with this class, but for some reason the dialogue is not dragged with the mouse. Here:
Could you tell me how to disable the processing of all events or button clicks for some time (for example, for the time of opening or closing positions)?
And more to the point? Do you have a question about the codes in this article?
Not necessarily this article... I just can't find them anywhere. For example... in the article there is a subscription to the button event handling
...
ON_EVENT(ON_CLICK,m_button_ok,OnClickButtonOK)
EVENT_MAP_END(CAppDialog)
Question: how can I disable this processing programmatically (disable ON_CLICK processing) and enable it again ?
not necessarily according to this article... I just can't find it anywhere. For example... in the article there is a subscription to the button event handling
...
ON_EVENT(ON_CLICK,m_button_ok,OnClickButtonOK)
EVENT_MAP_END(CAppDialog)
Question: how can I disable this processing programmatically (disable ON_CLICK processing) and enable it again ?
There is no way to forbid it, but you can write a flag check in the function of click processing - if the flag is true - then we process clicks, and if the flag is false - then we exit the function.
There is no way to forbid it, but you can write a flag check in the click processing function - if the flag is true - then we process clicks, and if the flag is false - then we exit the function.
I've already done that. it's not all the same... For example, when I close a lot of orders by pressing a button on the panel, I want the panel to not respond completely, otherwise if I click (at this time) on the buy button, the event will still occur, and there will be an input to the event handler after the close is triggered.
Do the right thing - processing the forbidden flag immediately upon entering the function.
Although... Just a minute....
Added:
No. You just need to process the push depending on the forbidden flag.