Whatever component that will be created in c++ builder will be assigned TComponentName.
For example when I create a form and assign it MyWidget it then the class that inherits TForm
gets class TMyWidget : TForm{} form. With spy++ like inspectors you can see registered class names of your apps.
Concerning this my question is the following.
- Is it possible at all and then how to create our forms, components
with our desired name(excluding prefix T)?
The way I did it I created VCL Forms App and saved it. Then replaced TForm1 with my own desired classname, say, in my case WidgetCl0x01 in the .h,.dfm,project source file in __classid() arg but there was compilation and linking problems!
Show me directions on how to achieve this not just by changing VCL source !
You can override the virtual
CreateParams()method to change the classname that is assigned to theHWNDthat is allocated for theTFormwindow, eg:Use the
Nameproperty in the Object Inspector to change the class name of theTFormclass itself in your code, don’t try to adjust it by name. Just know that it will always be prefixed with aT, you cannot avoid that unless you disable theTForm‘s DFM and create all of its content by hand in code, then the classname will not matter.