//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "MDIChildren.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
// BeginExample: MDIChildren
// Property: Forms.TCustomForm.MDIChildren
// Property: Forms.TCustomForm.MDIChildCount
// Method: Forms.TCustomForm.Close

// BeginCode
/*
This example uses several forms. The first form has its
FormStyle property set to MDIForm. The others have their
FormStyle properties set to MDIChild and their Visible
properties set to true. Add a main menu component and name
one of the menu items CloseChildren. This is code for the
CloseChildrenClick handler.  When the user chooses the
CloseChildren command, all the MDI children of Form1 are
closed.
*/
void __fastcall TForm1::CloseChildrenClick(TObject *Sender)
{
  for(int i = MDIChildCount - 1; i >= 0; i--)
    MDIChildren[i]->Close();
}

void __fastcall TForm1::MyArrangeIconsClick(TObject *Sender)
{
  Form1->ArrangeIcons();
}

void __fastcall TForm1::MyCascadeClick(TObject *Sender)
{
  Form1->Cascade();
  }
// EndCode
// EndExample: MDIChildren
//---------------------------------------------------------------------------
