[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CppBuilderVclUnit1H
The first thing you can notice is the use an #include guard:
Then the class TForm1 is declared, which inherits publicly from TForm:
The class's internals have __published, private and public access rights. The __published section is managed by C++ Builder itself. Don't touch, unless you know what you're doing. The other sections can have functions and variables added. There already is one function declared: the constructor of TForm1:
The last unknown line declares a global pointer to TForm1 called Form1. It is extern, so it can be used in multiple Units.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CppBuilderVclUnit1H
(C++ Builder) Unit1.h (VCL)
By default at start-up this is://---------------------------------------------------------------------------//---------------------------------------------------------------------------
- ifndef Unit1H
- define Unit1H
//--------------------------------------------------------------------------- class TForm1 : public TForm { __published: // IDE-managed Components private: // User declarations public: // User declarations __fastcall TForm1(TComponent* Owner); }; //--------------------------------------------------------------------------- extern PACKAGE TForm1 *Form1; //---------------------------------------------------------------------------
- include <Classes.hpp>
- include <Controls.hpp>
- include <StdCtrls.hpp>
- include <Forms.hpp>
- endif
The first thing you can notice is the use an #include guard:
After it, some usefull header files are #included.//Rest of code
- ifndef Unit1H
- define Unit1H
- endif
Then the class TForm1 is declared, which inherits publicly from TForm:
class TForm1 : public TForm
The class's internals have __published, private and public access rights. The __published section is managed by C++ Builder itself. Don't touch, unless you know what you're doing. The other sections can have functions and variables added. There already is one function declared: the constructor of TForm1:
__published: // IDE-managed Components private: // User declarations public: // User declarations __fastcall TForm1(TComponent* Owner); //Constructor
The last unknown line declares a global pointer to TForm1 called Form1. It is extern, so it can be used in multiple Units.
extern PACKAGE TForm1 *Form1;
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
