IVsObjectList.QueryDragDrop(UInt32, IDataObject, 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.
Returns a flag indicating whether the given list item supports a drag-and-drop operation.
public:
int QueryDragDrop(System::UInt32 index, Microsoft::VisualStudio::OLE::Interop::IDataObject ^ pDataObject, System::UInt32 grfKeyState, [Runtime::InteropServices::Out] System::UInt32 % pdwEffect);
int QueryDragDrop(unsigned int index, Microsoft::VisualStudio::OLE::Interop::IDataObject const & pDataObject, unsigned int grfKeyState, [Runtime::InteropServices::Out] unsigned int & pdwEffect);
public int QueryDragDrop (uint index, Microsoft.VisualStudio.OLE.Interop.IDataObject pDataObject, uint grfKeyState, out uint pdwEffect);
abstract member QueryDragDrop : uint32 * Microsoft.VisualStudio.OLE.Interop.IDataObject * uint32 * uint32 -> int
Public Function QueryDragDrop (index As UInteger, pDataObject As IDataObject, grfKeyState As UInteger, ByRef pdwEffect As UInteger) As Integer
Parameters
- index
- UInt32
[in] Specifies the index of the list item of interest.
- pDataObject
- IDataObject
[in] Pointer to an IDataObject being dropped.
- grfKeyState
- UInt32
[in] Current state of the keyboard and the mouse modifier keys.
- pdwEffect
- UInt32
[in, out] On input, the effect being requested. On output, the effect that your object list allows.
Returns
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsObjectList::QueryDragDrop(
[in] ULONG Index,
[in] IDataObject *pDataObject,
[in] DWORD grfKeyState,
[in, out]DWORD * pdwEffect
);
When the user drags an item and hovers over your item in Class View, the environment calls QueryDragDrop
to see if a drag-drop operation is supported.
This method is very similar to the standard COM DragOver method. Values for grfKeyState
can be a bitwise "or" combination of any number of the following: MK_CONTROL, MK_SHIFT, MK_ALT, MK_LBUTTON, MK_MBUTTON, and MK_RBUTTON. Values for the pdwEffect
are taken from the DROPEFFECT
enumeration.