CMFCTabDropTarget Class

Provides the communication mechanism between a tab control and the OLE libraries.

class CMFCTabDropTarget : public COleDropTarget

Members

Public Constructors

Name

Description

CMFCTabDropTarget::CMFCTabDropTarget

Default constructor.

Public Methods

Name

Description

CMFCTabDropTarget::OnDragEnter

Called by the framework when the user drags an object into a tab window. (Overrides COleDropTarget::OnDragEnter.)

CMFCTabDropTarget::OnDragLeave

Called by the framework when the user drags an object outside of the tab window that has focus. (Overrides COleDropTarget::OnDragLeave.)

CMFCTabDropTarget::OnDragOver

Called by the framework when the user drags an object onto the tab window that has focus. (Overrides COleDropTarget::OnDragOver.)

CMFCTabDropTarget::OnDropEx

Called by the framework when the user releases the mouse button at the end of a drag operation. (Overrides COleDropTarget::OnDropEx.)

CMFCTabDropTarget::Register

Registers the control as one that can be the target of an OLE drag-and-drop operation.

Remarks

This class provides drag-and-drop support to the CMFCBaseTabCtrl class. If your application initializes the OLE libraries by using the AfxOleInit function, CMFCBaseTabCtrl objects register themselves for drag-and-drop operations.

The CMFCTabDropTarget class extends its base class by making the tab that is under the cursor when a drag operation occurs active. For more information about drag-and-drop operations, see Drag and Drop (OLE).

Example

The following example demonstrates how to construct a CMFCTabDropTarget object and use its Register method.

   HWND hWndTab = NULL;
    CBasePane* basePane = new CBasePane();
    CMFCBaseTabCtrl* pTabParent = basePane->GetParentTabWnd(hWndTab);
    CMFCTabDropTarget* dropTarget = new CMFCTabDropTarget();
    dropTarget->Register(pTabParent);

Inheritance Hierarchy

CObject

   CCmdTarget

      COleDropTarget

         CMFCTabDropTarget

Requirements

Header: afxbasetabctrl.h

See Also

Reference

Hierarchy Chart

Concepts

Drag and Drop (OLE)

Other Resources

MFC Classes