Share via


COleDropSource Class

Allows data to be dragged to a drop target.

class COleDropSource : public CCmdTarget

Members

Public Constructors

Name

Description

COleDropSource::COleDropSource

Constructs a COleDropSource object.

Public Methods

Name

Description

COleDropSource::GiveFeedback

Changes the cursor during a drag-and-drop operation.

COleDropSource::OnBeginDrag

Handles mouse capture during a drag-and-drop operation.

COleDropSource::QueryContinueDrag

Checks to see whether dragging should continue.

Remarks

The COleDropTarget class handles the receiving portion of the drag-and-drop operation. The COleDropSource object is responsible for determining when a drag operation begins, providing feedback during the drag operation, and determining when the drag operation ends.

To use a COleDropSource object, just call the constructor. This simplifies the process of determining what events, such as a mouse click, begin a drag operation using COleDataSource::DoDragDrop, COleClientItem::DoDragDrop, or COleServerItem::DoDragDrop function. These functions will create a COleDropSource object for you. You might want to modify the default behavior of the COleDropSource overridable functions. These member functions will be called at the appropriate times by the framework.

For more information on drag-and-drop operations using OLE, see the article Drag and Drop (OLE).

For more information, see IDropSource in the Windows SDK.

Inheritance Hierarchy

CObject

CCmdTarget

COleDropSource

Requirements

Header: afxole.h

See Also

Reference

CCmdTarget Class

Hierarchy Chart

Concepts

MFC Sample HIERSVR

MFC Sample OCLIENT