CComDesignerToolbox

template <class T, REGENTRY * pdsRegArray, DWORD dwToolboxSupport, int iDesignerNameID = 0>
class CComDesignerToolbox : public CComDesignerBase<
T, pdsRegArray>

Parameters

T

Your class, derived from CComDesignerBase.

pdsRegArray

Pointer to REGENTRY array set up by registration macros.

dwToolboxSupport

DWORD value indicating required toolbox support. The value is one or more of the following: ISUPPORT_NONE, ISUPPORT_DRAGDROP, ISUPPORT_CLICKDRAG, ISUPPORT_BOTH.

iDesignerNameID

Resource ID of the toolbox name string. This ID must be a valid string resource in the resource (.rc) file.

CComDesignerToolboxSupport provides default toolbox support for the design-time object, specified through a set of registration macros. You can set up support for intrinsic toolbox items or ActiveX controls that can be dragged onto the designer surface. (Note that the samples, however, do not host ActiveX controls.) To use this class, the designer must also derive from CComControl.

#include <addes.h>

Class Members

Method Description
CComDesignerToolbox Constructor.
GetSelectedToolboxItem (TOOLBOXITEM **pptbItem) Queries the toolbox site for the current item and ensures that it is valid.
GetToolboxItemArray Default method.
HandleObject (TOOLBOXITEM * ptbItem, RECT *pRect) Override this method to provide designer-specific toolbox handling.
HandleValidToolboxObject Checks whether a toolbox item is valid and if so, passes the item to a user-defined handling routine.
IDesignerToolbox_GetControlsInUse (DWORD *pcControls, CLSID **prgClsid) Returns a list of the current ActiveX controls that are being used on the surface of the designer.
InitDesigner Initializes the class.
ObjectHasBeenPicked (void) Notifies the host that the designer has consumed an item from the toolbox. Use only in conjunction with Click & Drag.
PrepareForDragDrop (HWND hWnd) Registers the client area for Drag & Drop when the window is first displayed.
RegisterClipboardFormat (void) Default method for registering CF_DESIGNERTOOLBOXITEM format.
RevokeDragDrop (HWND hWnd) Removes the client area from the system's Drag & Drop list.
ValidateToolboxObject Determines whether an item is supported in the designer's toolbox.

Note Methods unique to the CComDesignerToolbox class are described here. For information on methods that implement those in other interfaces, see the ActiveX Designer Programmer's Reference and the Active Template Library in the MFC Foundation Class Library and Templates, part of the Visual C++ Reference.

See Also

Toolbox Item Macros, IDesignerToolbox