IVsToolbox2.AddTabEx2(String, VSTBXTABVIEW, Guid) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a tab to the Toolbox, specifying a tab view and a package GUID.
public:
int AddTabEx2(System::String ^ lpszTab, Microsoft::VisualStudio::Shell::Interop::VSTBXTABVIEW tv, Guid % guidPkg);
public int AddTabEx2 (string lpszTab, Microsoft.VisualStudio.Shell.Interop.VSTBXTABVIEW tv, ref Guid guidPkg);
abstract member AddTabEx2 : string * Microsoft.VisualStudio.Shell.Interop.VSTBXTABVIEW * Guid -> int
Public Function AddTabEx2 (lpszTab As String, tv As VSTBXTABVIEW, ByRef guidPkg As Guid) As Integer
Parameters
- lpszTab
- String
[in] The localized name of the tab to add to the Toolbox. The localized name can be obtained from the invariant non-localized name by calling GetIDOfTab(String, String).
- tv
- VSTBXTABVIEW
[in] Determines whether the tab is in list view or icon view. For a list of ptv
values, see VSTBXTABVIEW.
- guidPkg
- Guid
[in] Package GUID identifying your VSPackage.
Returns
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsToolbox2::AddTabEx2(
[in]LPCOLESTR lpszTab,
[in]VSTBXTABVIEW tv,
[in]REFGUID guidPkg
);
The uses the Package GUID to set the UI text for your Toolbox item. In the bstrText
element of the TBXITEMINFO structure, you should specify a resource ID of the form "#number". This resource ID must then correspond to the UI string for the Toolbox item in your satellite DLL. The Toolbox persists the package GUID and resource ID for each Toolbox item. This enables it to reassign each Toolbox UI string in the event that the user changes the environment language (locale).