Step 3: Connect to the IDesignerToolboxSite Interface

The IDesignerToolboxSite interface is required for communication with the host about the status and type of selected toolbox items. It is required for basic toolbox support along with Drag&Drop and Click&Drag functionality.

The IDesignerToolboxSite interface is exposed on the container through the IServiceProvider interface. The service map macros implement the CComDesignerServices class and provide access to host's services. See Service Map Macros for details.

The following service map includes the IDesignerToolboxSite service.

//--------------------------------------------------
// Services support
//--------------------------------------------------
BEGIN_SERVICES_MAP()
   SERVICES_MAP_ENTRY(&SID_DesignerToolboxSite,&IID_IDesignerToolboxSite)
END_SERVICES_MAP()

See Also

Step 4: Support Drag-and-Drop