CAppDialog panel auto minimizing

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?


#property copyright "Copyright 2020, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
#property indicator_chart_window


#include <Controls/Dialog.mqh>

CAppDialog AppWindow;

int OnInit()
{
   CreateInterface();
   return(INIT_SUCCEEDED);
}


void OnDeinit(const int reason)
{
   AppWindow.Destroy(reason);
}


int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
{ 
   return(rates_total);
   
}



void OnChartEvent(const int id,  
                  const long& lparam,
                  const double& dparam,
                  const string& sparam)
{
   AppWindow.ChartEvent(id,lparam,dparam,sparam);
   
}



void CreateInterface()
{
   AppWindow.Create(0,"AppWindow",0,0,0,300,250); 
   
   AppWindow.Run();
}


Vladimir Karputov  
These are the basics of the Windows system. When the timeframe is changed, the WINDOW of the chart changes its size. As you know, the WINDOW has two states: fully open ( ) and collapsed ( ). Minimize the window and increase its size. Now, when changing the chart, the window in the "minimized" mode will have the maximum size and the panel (probably) will not be minimized.
Udawaththa Kankanamge Don Raveen Asela Jayasingha  
Vladimir Karputov:
These are the basics of the Windows system. When the timeframe is changed, the WINDOW of the chart changes its size. As you know, the WINDOW has two states: fully open ( ) and collapsed ( ). Minimize the window and increase its size. Now, when changing the chart, the window in the "minimized" mode will have the maximum size and the panel (probably) will not be minimized.

Hello Vladimir,

Thank you for your reply. but im not talking about timeframe change. it happens when im switching charts. see the gif


Vladimir Karputov  
Udawaththa Kankanamge Don Raveen Asela Jayasingha :

Hello Vladimir,

Thank you for your reply. but im not talking about timeframe change. it happens when im switching charts. see the gif


It makes no difference - these are the basics of the Windows system. Instead of objecting, we would have tried increasing the window size long ago and solved our problem :)

Udawaththa Kankanamge Don Raveen Asela Jayasingha  
Vladimir Karputov:

It makes no difference - these are the basics of the Windows system. Instead of objecting, we would have tried increasing the window size long ago and solved our problem :)

can you explain how can i fix this please? 

Vladimir Karputov  
Udawaththa Kankanamge Don Raveen Asela Jayasingha:

can you explain how can i fix this please? 

Forum on trading, automated trading systems and testing trading strategies

CAppDialog panel auto minimizing

Vladimir Karputov, 2020.09.29 14:30

These are the basics of the Windows system. When the timeframe is changed, the WINDOW of the chart changes its size. As you know, the WINDOW has two states: fully open ( ) and collapsed ( ). Minimize the window and increase its size. Now, when changing the chart, the window in the "minimized" mode will have the maximum size and the panel (probably) will not be minimized.

Vladimir Karputov  
Udawaththa Kankanamge Don Raveen Asela Jayasingha :

cannot understand what you are saying here. i want to know how to fix this issue programmatically 

You can write to Microsoft - so that they change the work of Windows.

For now, do this:

Forum on trading, automated trading systems and testing trading strategies

CAppDialog panel auto minimizing

Vladimir Karputov, 2020.09.29 14:30

These are the basics of the Windows system. When the timeframe is changed, the WINDOW of the chart changes its size. As you know, the WINDOW has two states: fully open ( ) and collapsed ( ). Minimize the window and increase its size. Now, when changing the chart, the window in the "minimized" mode will have the maximum size and the panel (probably) will not be minimized.

Udawaththa Kankanamge Don Raveen Asela Jayasingha  
Vladimir Karputov:

You can write to Microsoft - so that they change the work of Windows.

For now, do this:


i don't understand why are you posting same thing over and over again. are you a moderator? really? i clearly said i want to know how to fix this issue programmatically and i have reason for that. if you don't know that's fine. just leave it there. someone will answer.

Vladimir Karputov  
Udawaththa Kankanamge Don Raveen Asela Jayasingha:

cannot understand what you are saying here. i want to know how to fix this issue programmatically 

Video:


Igor Widiger  
Vladimir Karputov:

Video:


Thanks for the help! I had the same problem.

Reason: