c++builder - Automating RegisterClass in C++ Builder VCL -


We use a C ++ builder for an application whose form is placed externally for the EXE in the database The application code is C ++

This allows us to modify the form and form / verb without compiling it again. Here's the snippet of code that gets the job of loading a form.

  RegisterClass (__class (Tibetan)); RegisterClass (__ ClassID); RegisterClass (__ ClassID (TRadioGroup)); RegisterClass (__ ClassID (TGroupBox)); RegisterClass (__ ClassID (TCheckBox)); RegisterClass (__ ClassID (TRadioButton)); RegisterClass (__ ClassID (TTimer)); RegisterClass (__ ClassID (TListBox)); RegisterClass (__ ClassID (TComboBox)); RegisterClass (__ ClassID (TBitBtn)); RegisterClass (__ ClassID (TSpeedButton)); RegisterClass (__ ClassID (TMaskEdit)); RegisterClass (__ ClassID (TProgressBar)); MS = New TMemoryStream; MS2 = New TMemoryStream; // Load modules in memory stream MS- & gt; Condition = 0; Ms- & gt; LoadFromFile (filename-> Text); MS- & gt; Condition = 0; PModule = new TForm (this); // read module definition if (! Input-image-> checked) {ms2-> Condition = 0; Objecttextbubbery (MS, MS2); MS-2-> Condition = 0; Ms2-> ReadComponent (pModule); } MS- & gt; ReadComponent (pModule); Log-> Lines-> Add ("display module"); PModule-> Show ();  

I am curious to know if there are any implicit functions I can call to register all sections referenced. I think the memory stream or file for all items It is possible to scan and call the register class for each, but was hoping someone had already done this about the function.

So, it would be good to register only those people who are in fact inherited.

You have the right approach here right, in my opinion I take the same approach years ago Using Delphi2, though I had never printed the VCL in my own factory and readComponent (as ObjectToText / TextToObject functions) implemented.

Only at the second point of the required entry classes, of course, they only need to register once? And to determine if any class should be registered, it will be heavier in the cost of entering everything. Again, I leave it like this.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -