[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CppBuilderVclUnit1CPP
First, the VCL is #included, later its header file Unit1.h.
The line below defines the pointer called Form1, an instance of TForm1:
The most difficult-looking line below, is the constructor of TForm1:
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CppBuilderVclUnit1CPP
(C++ Builder) Unit1.cpp (VCL)
Its default start-up code is://---------------------------------------------------------------------------
- include <vcl.h>
- pragma hdrstop
//---------------------------------------------------------------------------
- include "Unit1.h"
TForm1 *Form1; //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } //---------------------------------------------------------------------------
- pragma package(smart_init)
- pragma resource "*.dfm"
First, the VCL is #included, later its header file Unit1.h.
The line below defines the pointer called Form1, an instance of TForm1:
TForm1 *Form1;
The most difficult-looking line below, is the constructor of TForm1:
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
All VCL objects needs to be constructed with an Owner, so does TForm1. After the colon : it is initialized with its Owner. [Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
