IDropTarget::Drop
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 |
); |
|
Parameters
pDataObject
[in] Pointer
to the IDataObject
grfKeyState
[in] Current
state of the keyboard modifier keys on the keyboard. Valid values can be a
combination of any of the flags MK_CONTROL, MK_SHIFT, MK_ALT, MK_BUTTON, MK_LBUTTON,
MK_MBUTTON, and MK_RBUTTON.
pt
[in] Pointer
to the current cursor coordinates in the coordinate space of the drop target
window.
pdwEffect
[in, out]
Pointer to the current effect flag. Valid values are from the enumeration DROPEFFECT
Return Values
This method
supports the standard return values E_INVALIDARG, E_OUTOFMEMORY, and
E_UNEXPECTED, as well as the following:
S_OK
The method
completed its tasks successfully.
Remarks
You do not
call this method directly. The DoDragDrop
In
implementing IDropTarget::Drop, you must incorporate the data object
into the target. Use the formats available in IDataObject
In addition
to incorporating the data, you must also clean up as you do in the IDropTarget::DragLeave
Remove any target feedback that
is currently displayed.
Release any references to the
data object.
You also pass
the effect of this operation back to the source application through DoDragDrop
Remove any source feedback that
is being displayed.
Make any necessary changes to
the data, such as removing the data if the operation was a move.
See Also