Board index » cppbuilder » Creating a class from a given class type

Creating a class from a given class type


2004-01-09 10:52:47 PM
cppbuilder21
Hi!
How can I create a class from a given class type in C++Builder? Here is the
corresponding Delphi code:
type
TFormClass=TForm;
procedure Test(FormClass:TFormClass);
var
Form:TForm;
begin
Form:=FormClass.Create(...);
...
Thanks in advance.
Best regards,
Steffen Liersch
 
 

Re:Creating a class from a given class type

"Steffen Liersch" < XXXX@XXXXX.COM >wrote in message
Quote
How can I create a class from a given class type in C++Builder?
What you ask for is not doable with C++ code. The C++ language does not
support creating classes based on meta data like the Delphi Pascal language
supports. To do what you ask, you will have to continue using Pascal code.
Fortunately, BCB includes a Pascal compiler, so you can include .PAS units
into your C++ projects.
Gambit