COleDropSource Class

Allows data to be dragged to a drop target.

class COleDropSource : public CCmdTarget

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.

Requirements

Header: afxole.h

See Also

Concepts

HIERSVR Sample: Demonstrates a Server Application with OLE Drag and Drop

OCLIENT Sample: Illustrates a Visual Editing Container Application

COleDropSource Members

CCmdTarget Class

Hierarchy Chart