Sdílet prostřednictvím


IVsAddToolboxItems.AddItem(IDataObject, TBXITEMINFO[], String, String) Method

Definition

Adds an item to the toolbox.

public:
 int AddItem(Microsoft::VisualStudio::OLE::Interop::IDataObject ^ pDO, cli::array <Microsoft::VisualStudio::Shell::Interop::TBXITEMINFO> ^ ptif, System::String ^ szItemID, System::String ^ lpszTab);
int AddItem(Microsoft::VisualStudio::OLE::Interop::IDataObject const & pDO, std::Array <Microsoft::VisualStudio::Shell::Interop::TBXITEMINFO> const & ptif, std::wstring const & szItemID, std::wstring const & lpszTab);
public int AddItem (Microsoft.VisualStudio.OLE.Interop.IDataObject pDO, Microsoft.VisualStudio.Shell.Interop.TBXITEMINFO[] ptif, string szItemID, string lpszTab);
abstract member AddItem : Microsoft.VisualStudio.OLE.Interop.IDataObject * Microsoft.VisualStudio.Shell.Interop.TBXITEMINFO[] * string * string -> int
Public Function AddItem (pDO As IDataObject, ptif As TBXITEMINFO(), szItemID As String, lpszTab As String) As Integer

Parameters

pDO
IDataObject

[in] IDataObject to be added to the tab in the Toolbox.

ptif
TBXITEMINFO[]

[in] A TBXITEMINFO structure identifying item characteristics, such as the item name and icon.

szItemID
String

[in] The item ID string.

lpszTab
String

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

Returns

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

Applies to