CAppDialog panel auto minimizing - page 2

 
Pay24Money:

Thanks for the help! I had the same problem.

It is actually worse in my case, it hides minimised under the trade and market depth widgets making it impossible to open again! 

Did anyone find a fix? 


OK After a bit of research here is a solution for the benefit of anyone else having the same problem.

In your EA intercept CHARTEVENT_CHART_CHANGE and call your dialog's Maximize() method. That will ensure the dialog is maximised when you return to the chart.   


If anyone has a better solution let me know!

 
Udawaththa Kankanamge Don Raveen Asela Jayasingha:

below is my code for a simple panel using CAppDialog class. the problem is when change pairs this panel gets minimized automatically. for example, let's say I loaded this to EURUSD and I switch to USDJPY and comeback to EURUSD, I can see only a minimized panel. I don't know why this happens? is there anything I'm doing wrong? what's even more strange is when I set y2 value to 246 it works without a problem. but for values greater than 246 it gets minimized. how can I overcome this without modifying libraries?



Hi,

I used OnEvent instead of ChartEvent, and Bingoooo!, it worked


void OnChartEvent(const int id, const long& lparam, const double& dparam, const string& sparam)
{
   m_panel.OnEvent(id, lparam, dparam, sparam);
}
 
Anthony Eric Gillon Dawson #:

It is actually worse in my case, it hides minimised under the trade and market depth widgets making it impossible to open again! 

Did anyone find a fix? 


OK After a bit of research here is a solution for the benefit of anyone else having the same problem.

In your EA intercept CHARTEVENT_CHART_CHANGE and call your dialog's Maximize() method. That will ensure the dialog is maximised when you return to the chart.   


If anyone has a better solution let me know!


Hey Anthony,

How do we call the Maximize() method for that our Dialog? 

Thanks.

 
void OnChartEvent(const int id, const long& lparam, const double& dparam, const string& sparam)
{
  if(id!=CHARTEVENT_CHART_CHANGE)
     {
       m_panel.OnEvent(id, lparam, dparam, sparam);
     }   
}
try this, that is how I fixed this problem with me.
 
Temitayo Lawal #:

Hi,

I used OnEvent instead of ChartEvent, and Bingoooo!, it worked


great thanks it's work...

 

None of the above guides solved the problem for me but they were helpful in pointing me in the right direction.

void OnChartEvent(const int id,         // event ID  
                  const long& lparam,   // event parameter of the long type
                  const double& dparam, // event parameter of the double type
                  const string& sparam) // event parameter of the string type
{
        ControlsDialog.ChartEvent(id, lparam, dparam, sparam);                  //this is needed for the controls to work by default
        if ( id == CHARTEVENT_CHART_CHANGE )                                    //chart changed event, ie. I switched from one to another
        {
                ControlsDialog.maximizeWindow();
        }
}

//+------------------------------------------------------------------+
//| Maximize ControlsDialog subwindow                                |
//+------------------------------------------------------------------+
void CControlsDialog::maximizeWindow(void)
{
        this.Maximize();                                //I can't use protected class function Maximize() from outside the class so I need this public member function
}

Finally I don't have to search for that tiny maximize icon to click on it. I can see the Controls dialog all the time. :)

 
VikMorroHun #:

None of the above guides solved the problem for me but they were helpful in pointing me in the right direction.

Finally I don't have to search for that tiny maximize icon to click on it. I can see the Controls dialog all the time. :)

Thank you. This was very helpful.

 
VikMorroHun #:

None of the above guides solved the problem for me but they were helpful in pointing me in the right direction.

Finally I don't have to search for that tiny maximize icon to click on it. I can see the Controls dialog all the time. :)

Thank you so much man.