IVsToolWindowToolbarHost2.AddToolbar2 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
扩展 AddToolbar(VSTWT_LOCATION, Guid, UInt32) 方法,以允许指定放置目标来处理工具栏区域上的删除操作。
public:
int AddToolbar2(Microsoft::VisualStudio::Shell::Interop::VSTWT_LOCATION dwLoc, Guid % pGuid, System::UInt32 dwId, Microsoft::VisualStudio::OLE::Interop::IDropTarget ^ pDropTarget);
public int AddToolbar2 (Microsoft.VisualStudio.Shell.Interop.VSTWT_LOCATION dwLoc, ref Guid pGuid, uint dwId, Microsoft.VisualStudio.OLE.Interop.IDropTarget pDropTarget);
abstract member AddToolbar2 : Microsoft.VisualStudio.Shell.Interop.VSTWT_LOCATION * * uint32 * Microsoft.VisualStudio.OLE.Interop.IDropTarget -> int
Public Function AddToolbar2 (dwLoc As VSTWT_LOCATION, ByRef pGuid As Guid, dwId As UInteger, pDropTarget As IDropTarget) As Integer
参数
- dwLoc
- VSTWT_LOCATION
中指定工具栏在工具窗口中的位置。 值取自 VSTWT_LOCATION 枚举。
- pGuid
- Guid
中工具栏的菜单组的 GUID。
- dwId
- UInt32
中与结合在一起的 ID pguid 标识要添加的工具栏。
- pDropTarget
- IDropTarget
中放置目标。
返回
如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。