Pues quiero crear una clase que derive del TPanel y que contenga un Panel y un listbox
TblPanel.h
Código:
//---------------------------------------------------------------------------
#ifndef TblPanelH
#define TblPanelH
//---------------------------------------------------------------------------
class TTblPanel : public TPanel
{
__published:
private:
TTblPanel *TblPanel;
TListBox *ListBox1;
TPanel *Panel2;
public:
__fastcall TTblPanel(TWinControl *Parent);
};
//---------------------------------------------------------------------------
#endif
TblPanel.cpp
Código:
//---------------------------------------------------------------------------
#include <vcl.h>
#include "TblPanel.h"
//---------------------------------------------------------------------------
__fastcall TTblPanel::TTblPanel(TWinControl *Parent)
: TPanel(Owner)
{
TTblPanel::Parent = Parent;
TTblPanel::Height = 200;
TTblPanel::Width = 160;
TTblPanel::Visible = true;
TTblPanel::Panel2->Caption = "yyy";
TTblPanel::Panel2->Align = alTop;
TTblPanel::ListBox1->Align = alClient;
}
//---------------------------------------------------------------------------
Al compilar me manda el error "Access violation address ...", alguien sabe en que fallo?