Stack Overflow

 
Boa noite. Eu criei essa classe para fazer um painel personalizado, porém quando anexo o EA no gráfico dá uma mensagem de erro acusando Stack Overflow. No EA eu apenas criei a instancia do objeto para teste. Eu tentei usar o operador new mas também dá o mesmo problema. Eu tomei como referência a Classe Base CListView. Alguém já teve o mesmo problema e saberia como resolver???

Segue a classe
#include <Controls\Defines.mqh>
#include <Controls\Edit.mqh>
#include <Controls\WndClient.mqh>

class CPanelTabs : public CWndContainer
{
private:
   CPanel         m_border;
   CEdit          m_button[];
   CWndClient     m_client[];
   int            m_select;
   color          m_color;
   color          m_color_border;
   color          m_color_background;

public:
                  CPanelTabs();
                 ~CPanelTabs();
   virtual bool   Create(const long chart,const string name,const int subwin,const int x1,const int y1,const int x2,const int y2);
   virtual bool   OnEvent(const int id,const long &lparam,const double &dparam,const string &sparam);
   virtual bool   Color(color COLOR);
   color          Color(void){return m_color;};
   virtual bool   ColorBackground(color COLOR);
   color          ColorBackground(void){return m_color_background;};
   virtual bool   ColorBorder(color COLOR);
   color          ColorBorder(void){return m_color_border;};
   virtual bool   Select(const int index);
   virtual bool   CreateTab(const string name);

protected:
   virtual bool   OnClickButton(const int index){return Select(index);};
   virtual bool   Resize(const int width);
};
//===================================================
EVENT_MAP_BEGIN(CPanelTabs)
   ON_INDEXED_EVENT(ON_CLICK,m_button,OnClickButton)
EVENT_MAP_END(CWndContainer)
//===================================================
CPanelTabs::CPanelTabs(void) :   m_select(0),
                                 m_color(CONTROLS_BUTTON_COLOR),
                                 m_color_background(CONTROLS_CLIENT_COLOR_BG),
                                 m_color_border(CONTROLS_BUTTON_COLOR_BORDER)
{}
CPanelTabs::~CPanelTabs(void){}
//===================================================
bool CPanelTabs::Create(const long chart,const string name,const int subwin,const int x1,const int y1,const int x2,const int y2)
{
   if(!Create(chart,name,subwin,x1,y1,x2,y2)) return false;
   if(!m_border.Create(m_chart_id,m_name+"Border",m_subwin,x1,CONTROLS_BUTTON_SIZE,x2,y2)) return false;
   if(!Color(m_color)) return false;
   if(!ColorBackground(m_color_background)) return false;
   if(!ColorBorder(m_color_border)) return false;
   Add(m_border);
   return true;
}

bool CPanelTabs::Color(color COLOR)
{
   m_color=COLOR;
   int total=ArraySize(m_button);
   if(total>0)for(int i=0;i<total;i++)
   {
      if(!m_button[i].Color(COLOR)) return false;
   }
   return true;
}

bool CPanelTabs::ColorBorder(color COLOR)
{
   m_color_border=COLOR;
   int total=ArraySize(m_button);
   if(total>0)for(int i=0;i<total;i++)
   {
      if(!m_button[i].ColorBorder(COLOR)) return false;
      if(!m_client[i].ColorBorder(clrNONE)) return false;
   }
   if(!m_border.ColorBorder(COLOR)) return false;
   return true;
}

bool CPanelTabs::ColorBackground(color COLOR)
{
   m_color_background=COLOR;
   int total=ArraySize(m_button);
   if(total>0)for(int i=0;i<total;i++)
   {
      if(!m_button[i].ColorBackground(COLOR)) return false;
      if(!m_client[i].ColorBackground(COLOR)) return false;
   }
   return true;
}

bool CPanelTabs::Select(const int index)
{
   m_select=index;
   int total=ArraySize(m_button);
   if(total>0)for(int i=0;i<total;i++)
   {
      if(i==index)
      {
         if(!m_button[i].Height(CONTROLS_BUTTON_SIZE+1)) return false;
         if(!m_client[i].Show()) return false;
         if(!m_client[i].Visible(true)) return false;
      }
      else
        {
         if(!m_button[i].Height(CONTROLS_BUTTON_SIZE)) return false;
         if(!m_client[i].Visible(false)) return false;
         if(!m_client[i].Hide()) return false;
        }
   }return true;
}

bool CPanelTabs::CreateTab(const string name)
{
   int total=ArraySize(m_button)+1;
   int index = total-1;
   int width = Width()/total;
   ArrayResize(m_button,total);
   ArrayResize(m_client,total);
   
   if(!m_button[index].Create(m_chart_id,m_name+name+"Tab",m_subwin,width*index,0,width*(index+1),CONTROLS_BUTTON_SIZE)) return false;
   if(!m_client[index].Create(m_chart_id,m_name+name+"Client",m_subwin,0,CONTROLS_BUTTON_SIZE,Width(),Height())) return false;
   if(!Color(m_color)) return false;
   if(!ColorBackground(m_color_background)) return false;
   if(!ColorBorder(m_color_border)) return false;
   if(!Select(index)) return false;
   Resize(width);
   Add(m_button[index]);
   Add(m_client[index]);
   return true;
}
bool CPanelTabs::Resize(const int width)
{
   int total=ArraySize(m_button);
   if(total>0)for(int i=0;i<total;i++)
   {
      m_button[i].Left(width*i);
      if(!m_button[i].Width(width)) return false;
   }return true;
}
Razão: