Show: Delphi C++
Display Preferences


From RAD Studio
Jump to: navigation, search

Go Up to C++ Keyword Extensions


Operators (C++), Keyword Extensions




The __classid operator was added to support the VCL framework. You can use it to obtain the metaclass of a TObject-based class (a Delphi-style class).

For example, __classid is used when registering property editors, components, and classes, and with the InheritsFrom method of TObject. The following code illustrates the use of __classid for creating a new component derived from TWinControl:

namespace Ywndctrl
  void __fastcall PACKAGE Register() {
    TComponentClass classes[1] = {__classid(MyWndCtrl)};
    RegisterComponents("Additional", classes, 0);

See Also

Personal tools
RAD Studio 10.2 Tokyo
In other languages
Previous Versions