IVsObjectList::QueryDragDrop Method (UInt32, IDataObject^, UInt32, UInt32)
Returns a flag indicating whether the given list item supports a drag-and-drop operation.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
int QueryDragDrop( unsigned int index, IDataObject^ pDataObject, unsigned int grfKeyState, unsigned int% pdwEffect )
Parameters
- index
-
Type:
System::UInt32
[in] Specifies the index of the list item of interest.
- pDataObject
-
Type:
Microsoft.VisualStudio.OLE.Interop::IDataObject^
[in] Pointer to an IDataObject being dropped.
- grfKeyState
-
Type:
System::UInt32
[in] Current state of the keyboard and the mouse modifier keys.
- pdwEffect
-
Type:
System::UInt32
[in, out] On input, the effect being requested. On output, the effect that your object list allows.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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.