Freigeben über


IVsToolbox2.AddActiveXItem(Guid, String, IVsHierarchy) Method

Definition

Allows ActiveX controls to be programmatically added to the Toolbox.

public:
 int AddActiveXItem(Guid % clsid, System::String ^ lpszTab, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHierarchy);
public int AddActiveXItem (ref Guid clsid, string lpszTab, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHierarchy);
abstract member AddActiveXItem : Guid * string * Microsoft.VisualStudio.Shell.Interop.IVsHierarchy -> int
Public Function AddActiveXItem (ByRef clsid As Guid, lpszTab As String, pHierarchy As IVsHierarchy) As Integer

Parameters

clsid
Guid

[in] Class identifier defining the ActiveX control to add to the Toolbox.

lpszTab
String

[[in] The localized name of the tab to add in] Toolbox tab to add the ActiveX control to. The localized name can be obtained from the invariant non-localized name by calling GetIDOfTab(String, String).

pHierarchy
IVsHierarchy

[in] Not implemented.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Implements

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsToolbox2::AddActiveXItem(  
   [in]REFCLSID clsid,  
   [in]LPCOLESTR lpszTab,  
   [in]IVsHierarchy *pHierarchy  
);  

The Toolbox is a collection of tabs and each tab has a collection of items on it. The items on the tab are an IDataObject, which is the object used to pass information through the clipboard or through OLE. The Toolbox's default data provider of the Toolbox is an ActiveX data provider. To add a non-ActiveX item to the Toolbox, use AddItem.

Applies to