text: //---------------------------------------------------------------------------
  #include <clx.h>
  #pragma hdrstop
  
  #include "ClxMain.h"
  #include "ClxAbout.h"
  //---------------------------------------------------------------------------
  #pragma resource "*.xfm"
  TMainForm *MainForm;
  //---------------------------------------------------------------------------
  
  __fastcall TMainForm::TMainForm(TComponent *Owner)
  	: TForm(Owner)
  {
  }
  //---------------------------------------------------------------------------
  
  void __fastcall TMainForm::CreateMDIChild(String Name)
  {
  	TMDIChild *Child;
  
  	//--- create a new MDI child window ----
  	Child = new TMDIChild(Application);
  	Child->Caption = Name;
  	if (FileExists (Name))
  		Child->Memo1->Lines->LoadFromFile(Name);
  }
  //---------------------------------------------------------------------------
  
  void __fastcall TMainForm::FileNew1Execute(TObject *Sender)
  {
  	CreateMDIChild("NONAME" + IntToStr(MDIChildCount + 1));
  }
  //---------------------------------------------------------------------------
  
  void __fastcall TMainForm::FileOpen1Execute(TObject *Sender)
  {
  	if (OpenDialog->Execute())
  		CreateMDIChild(OpenDialog->FileName);
  }
  //---------------------------------------------------------------------------
  
  void __fastcall TMainForm::HelpAbout1Execute(TObject *Sender)
  {
  	AboutBox->ShowModal();
  }
  //---------------------------------------------------------------------------
  
  void __fastcall TMainForm::FileExit1Execute(TObject *Sender)
  {
  	Close();
  }
  //---------------------------------------------------------------------------
  
  