To request support for the toolbox, you specify one of the following as the third (optional) parameter to CComDesignerToolbox:
By default, no toolbox support is provided. You must explicitly request toolbox support in CComDesignerToolbox with one of the listed enumerators, and your designer inherit from IDesignerToolboxImpl. To support Drag & Drop, the designer must also inherit from IDesignerDropTargetImpl.
The following example shows the classes from which a designer must be derived to support drag & drop:
class CShapesDsr:
…
public CComDesignerToolbox<CShapesDsr,RegEntryArray,ISUPPORT_DRAGDROP>,
public IDesignerToolboxImpl<CShapesDsr>
public IDesignerDropTarget<CShapesDsr>
{
};
If your designer will host controls, it must implement the required container features. CComDesignerToolbox provides a method of validating controls that are dragged onto the design surface, but hosting is a separate issue; see the ActiveX controls documentation for details.
See Also