Compartir a través de


IVsAddToolboxItems.AddItem Method

Adds an item to the toolbox.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assemblies:   Microsoft.VisualStudio (in Microsoft.VisualStudio.dll)
  Microsoft.VisualStudio.Shell.Interop.10.0 (in Microsoft.VisualStudio.Shell.Interop.10.0.dll)

Syntax

'Declaration
Function AddItem ( _
    pDO As IDataObject, _
    ptif As TBXITEMINFO(), _
    szItemID As String, _
    lpszTab As String _
) As Integer
int AddItem(
    IDataObject pDO,
    TBXITEMINFO[] ptif,
    string szItemID,
    string lpszTab
)
int AddItem(
    [InAttribute] IDataObject^ pDO, 
    [InAttribute] array<TBXITEMINFO>^ ptif, 
    [InAttribute] String^ szItemID, 
    [InAttribute] String^ lpszTab
)
abstract AddItem : 
        pDO:IDataObject * 
        ptif:TBXITEMINFO[] * 
        szItemID:string * 
        lpszTab:string -> int
function AddItem(
    pDO : IDataObject, 
    ptif : TBXITEMINFO[], 
    szItemID : String, 
    lpszTab : String
) : int

Parameters

  • szItemID
    Type: String

    [in] The item ID string.

  • lpszTab
    Type: 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.

Return Value

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

.NET Framework Security

See Also

Reference

IVsAddToolboxItems Interface

Microsoft.VisualStudio.Shell.Interop Namespace