IVsToolbox::AddActiveXItem Method (Guid, String^, IVsHierarchy^)

 

Allows ActiveX controls to be programmatically added to the Toolbox.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

int AddActiveXItem(
	[InAttribute] Guid% clsid,
	String^ lpszTab,
	IVsHierarchy^ pHierarchy
)

Parameters

clsid
Type: System::Guid

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

lpszTab
Type: System::String^

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

pHierarchy
Type: Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^

[in] Not implemented.

Return Value

Type: System::Int32

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

From vsshell.idl:

HRESULT IVsToolbox::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.

Return to top
Show: