

Typically, the data is highlighted to signal it has been selected. Provided by the drag source, the source feedback indicates the data is being dragged and does not change during the course of the drag.

DoDragDrop is the key function in the drag and drop process, facilitating communication between the drag source and drop target.ĭuring a drag and drop operation, three types of feedback can be displayed to the user. The OLE function DoDragDrop implements a loop that tracks mouse and keyboard movement until such time as the drag is canceled or a drop occurs. The role of drag source or drop target is not limited to any one type of OLE application. The IDropSource and IDropTarget interfaces can be implemented in either a container or in an object application. After the operation is in progress, it facilitates communication between the drag source and the drop target. Implemented by OLE and used to initiate a drag and drop operation. Implemented by the object that is intended to accept the drop, referred to as the drop target.

Implemented by the object containing the dragged data, referred to as the drag source.
#Drag and drop flinto code#
In fact, if an application supports clipboard copy and paste, little extra is needed to support drag and drop.ĭuring an OLE drag and drop operation, the following three separate pieces of code are used. Drag and drop provides exactly the same functionality as the OLE clipboard copy and paste but adds visual feedback and eliminates the need for menus. While continuing to hold down the button, the user initiates the transfer by dragging the object to its destination, which can be any OLE container. In a typical drag and drop operation, a user selects the object to be transferred by moving the mouse pointer to it and holding down either the left button or some other button designated for this purpose. Drag and drop refers to data transfers in which a mouse or other pointing device is used to specify both the data source and its destination.
