Show: Delphi C++
Display Preferences

Connecting a Property Page to an ActiveX Control

From RAD Studio
Jump to: navigation, search

Go Up to Creating a Property Page for an ActiveX Control


Describes the steps in connecting an ActiveX control to a property page.

To connect a property page to an ActiveX control:

  1. Add DefinePropertyPage with the GUID constant of the property page as the parameter to the DefinePropertyPages method implementation in the control's implementation for the unit. For example:
procedure 
 TButtonX.DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage);
 begin 
   DefinePropertyPage(Class_PropertyPage1);>end;
   BEGIN_PROPERTY_MAP(TActiveFormXImpl) 
   // Define property pages here. Property pages are defined using 
   //the PROP_PAGE macro with the class id of the page. For example, 
   // PROP_PAGE(CLSID_ActiveFormXPage) PROP_PAGE(CLSID_PropertyPage1)  
  END_PROPERTY_MAP()
The GUID constant, Class_PropertyPage1, of the property page can be found in the property pages unit.The GUID is defined in the property page's implementation unit.
  1. Add the property page unit to the uses clause of the controls implementation unit.

See Also

Personal tools
RAD Studio 10.2 Tokyo
In other languages
Previous Versions
Assistance