IVsHierarchyDropDataTarget.Drop(IDataObject, UInt32, UInt32, UInt32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called when one or more items are dropped into the target hierarchy or hierarchy window when the mouse button is released.
public:
int Drop(Microsoft::VisualStudio::OLE::Interop::IDataObject ^ pDataObject, System::UInt32 grfKeyState, System::UInt32 itemid, [Runtime::InteropServices::Out] System::UInt32 % pdwEffect);
int Drop(Microsoft::VisualStudio::OLE::Interop::IDataObject const & pDataObject, unsigned int grfKeyState, unsigned int itemid, [Runtime::InteropServices::Out] unsigned int & pdwEffect);
public int Drop (Microsoft.VisualStudio.OLE.Interop.IDataObject pDataObject, uint grfKeyState, uint itemid, out uint pdwEffect);
abstract member Drop : Microsoft.VisualStudio.OLE.Interop.IDataObject * uint32 * uint32 * uint32 -> int
Public Function Drop (pDataObject As IDataObject, grfKeyState As UInteger, itemid As UInteger, ByRef pdwEffect As UInteger) As Integer
Parameters
- pDataObject
- IDataObject
[in] Pointer to the IDataObject interface on the item being dragged. This data object contains the data being transferred in the drag-and-drop operation. If the drop occurs, then this data object (item) is incorporated into the target hierarchy or hierarchy window.
- grfKeyState
- UInt32
[in] Current state of the keyboard and the mouse modifier keys. Valid values are shown in the following table. These values can be combined using a bitwise OR operator.[1|1] Hex[1|2] Value[1|3] Description[2|1] 0x0001[2|2] MK_LBUTTON[2|3] Left mouse button is clicked.[3|1] 0x0002[3|2] MK_RBUTTON[3|3] Right mouse button is clicked.[4|1] 0x0004[4|2] MK_SHIFT[4|3] SHIFT key is pressed.[5|1] 0x0008[5|2] MK_CONTROL[5|3] CONTROL key is pressed.[6|1] 0x0010[6|2] MK_MBUTTON[6|3] Middle mouse button is clicked.[7|1] 0x0020[7|2] MK_ALT[7|3] ALT key is pressed.
- itemid
- UInt32
[in] Item identifier of the drop data target over which the item is being dragged. For a list of itemid
values, see VSITEMID.
- pdwEffect
- UInt32
[in, out] Visual effects associated with the drag-and drop-operation, such as a cursor, bitmap, and so on. The value of dwEffects
passed to the source object via the OnDropNotify(Int32, UInt32) method is the value of pdwEffects returned by the Drop(IDataObject, UInt32, UInt32, UInt32) method.
Returns
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsHierarchyDropDataTarget::Drop(
[in]IDataObject * pDataObject,
[in]DWORD grfKeyState,
[in]VSITEMID itemid,
[in,out]DWORD * pdwEffect
);
In implementing this method you must incorporate the data object into the target. Use the formats available in the IDataObject interface, available through pDataObject
, along with the current state of the modifier keys to determine how the data is to be incorporated (by linking, copying, or moving).