Features of the Visual Designer

The visual designer negotiates the interaction between the ActiveX designer, the host, and the end user. Its visual user interface interacts with the end user to create a run-time object.

The following table summarizes the functions of the visual designer. Not all of these capabilities must be provided by every designer.

Function What you must do
Be an embedded object (required). Implement IOleObject.
Create instances (required). Implement IClassFactory or IClassFactory2.
Provide a visual designer (required). Implement IOleInPlaceObject and IOleInPlaceActiveObject.
Provide type information to the host (required). Implement IProvideClassInfo or IProvideDynamicClassInfo.
Invoke properties and methods (required). Implement IDispatch. Most designers also support VTBL interfaces.
Save and load persistent data (required). Implement IPersist and IPersistStream, IPersistStreamInit, or IPersistStorage.
Handle events (optional). Implement IConnectionPointContainer and IConnectionPoint.
Support a property browsing mechanism (optional). Implement IPropertyNotifySink, IPerPropertyBrowsing, IPropertyPage, IPropertyPage2, ISpecifyPropertyPages.
Use IPropertyPageSite.
Save design-time state in a text file, so the project can more easily be saved in a source code control system. Implement IPersistPropertyBag.
Use services (optional). Use IServiceProvider.
Receive notification before and after the host enters run mode (optional). Implement IDesignerDebugging.
Specify a path or URL for the host to invoke at run-time start up (optional). Implement IDesignerDebugging.
Provide custom registration information for created objects (optional). Implement IDesignerRegistration.
Allow the user to navigate to and from code (optional). Use SCodeNavigate.
Display items in the host's toolbox and allow the user to click & drag or drag & drop toolbox items (optional). Implement IDesignerToolbox and OLE Drag & Drop.
Use SDesignerToolboxSite.
Create a different run-time object (optional). Implement IActiveDesigner.
Create and validate identifiers in host environment (optional). Use SDesignerProgrammability.
Support programmability by add-in objects (optional). Implement IActiveDesigner.
Support "Save As Text" (optional). Implement IPersistPropertyBag.
Use ambient properties (optional). Implement IOleControl.
Use IOleControlSite.
Synchronize current selection with host. Implement ISelectionContainer.
Use STrackSelection.
Add type library references to host. Use SProfferTypeLib.