Incorporates the source data into the target window, removes target feedback, and releases the data object.
HRESULT Drop(
IDataObject * pDataObject,
//Pointer to the interface for the source data
DWORD grfKeyState, //Current state of keyboard modifier keys
POINTL pt, //Pointer to the current cursor coordinates
DWORD * pdwEffect //Pointer to the effect of the drag-and-drop
// operation
);
This method supports the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following:
You do not call this method directly. The DoDragDrop function calls this method when the user completes the drag-and-drop operation.
In implementing IDropTarget::Drop, you must incorporate the data object into the target. Use the formats available in IDataObject, available through pDataObject, along with the current state of the modifier keys to determine how the data is to be incorporated, such as linking or embedding.
In addition to incorporating the data, you must also clean up as you do in the IDropTarget::DragLeave method:
You also pass the effect of this operation back to the source application through DoDragDrop, so the source application can clean up after the drag-and-drop operation is complete:
Windows NT: Use version 3.1 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in oleidl.h.
DoDragDrop, IDropSource, IDropTarget, RegisterDragDrop, RevokeDragDrop