RAD Studio
ContentsIndex
PreviousUpNext
Connecting a Property Page to an ActiveX Control
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.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!