COleDropSource Class

Allows data to be dragged to a drop target.

class COleDropSource : public CCmdTarget


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.


Header: afxole.h

See Also


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

OCLIENT Sample: Illustrates a Visual Editing Container Application


CCmdTarget Class

Hierarchy Chart

Other Resources

COleDropSource Members