IVsHierarchyDropDataSource.GetDropInfo 方法

定义

返回有关要拖动的一个或多个项的信息。

public:
 int GetDropInfo([Runtime::InteropServices::Out] System::UInt32 % pdwOKEffects, [Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IDataObject ^ % ppDataObject, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IDropSource ^ % ppDropSource);
int GetDropInfo([Runtime::InteropServices::Out] unsigned int & pdwOKEffects, [Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IDataObject const & & ppDataObject, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IDropSource const & & ppDropSource);
public int GetDropInfo (out uint pdwOKEffects, out Microsoft.VisualStudio.OLE.Interop.IDataObject ppDataObject, out Microsoft.VisualStudio.Shell.Interop.IDropSource ppDropSource);
abstract member GetDropInfo : uint32 * IDataObject * IDropSource -> int
Public Function GetDropInfo (ByRef pdwOKEffects As UInteger, ByRef ppDataObject As IDataObject, ByRef ppDropSource As IDropSource) As Integer

参数

pdwOKEffects
UInt32

弄一个指向值的指针 DWORD ,该值描述在拖动项时显示的效果,如在拖放操作过程中发生更改的光标图标。 例如,如果将项拖动到无效的目标点上 (例如项的原始位置) ,则光标图标将变为一条带线的圆圈。 同样,如果将项拖动到有效的目标点上,则光标图标将更改为文件或文件夹。

ppDataObject
IDataObject

弄指向 IDataObject 正在拖动的项的接口的指针。 此数据对象包含拖放操作中传输的数据。 如果发生删除,则会将此数据对象 (项) 合并到 "目标层次结构" 或 "层次结构" 窗口中。

ppDropSource
IDropSource

弄指向 IDropSource 正在拖动的项的接口的指针。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

注解

COM 签名

从 vsshell:

HRESULT IVsHierarchyDropDataSource::GetDropInfo(  
   [out]DWORD* pdwOKEffects,  
   [out]IDataObject** ppDataObject,  
   [out]IDropSource** ppDropSource  
);  

此方法基于将源数据拖动到的项更改光标。 游标值由 OLE 决定。 例如,对于 DROP_NONE 的效果,将显示一个带有线条的圆圈;对于移动,将显示带有箭头的框;对于副本,会显示带有加号的移动图标。

适用于