Share via


IVsProfferCommands4.AddCommandBar Method

Definition

Adds a command bar to the user interface.

public:
 int AddCommandBar(System::String ^ pszCmdBarName, System::UInt32 dwType, System::Object ^ pCmdBarParent, System::UInt32 dwIndex, [Runtime::InteropServices::Out] System::Object ^ % ppCmdBar);
int AddCommandBar(std::wstring const & pszCmdBarName, unsigned int dwType, winrt::Windows::Foundation::IInspectable const & pCmdBarParent, unsigned int dwIndex, [Runtime::InteropServices::Out] winrt::Windows::Foundation::IInspectable const & & ppCmdBar);
public int AddCommandBar (string pszCmdBarName, uint dwType, object pCmdBarParent, uint dwIndex, out object ppCmdBar);
abstract member AddCommandBar : string * uint32 * obj * uint32 * obj -> int
Public Function AddCommandBar (pszCmdBarName As String, dwType As UInteger, pCmdBarParent As Object, dwIndex As UInteger, ByRef ppCmdBar As Object) As Integer

Parameters

pszCmdBarName
String

[in] The name of the command bar.

dwType
UInt32

[in] A value from the vsCommandBarType enumeration.

pCmdBarParent
Object

[in] The parent of the command bar. Use null for a top-level command bar.

dwIndex
UInt32

[in] The index location at which to insert the new command bar on the parent.

ppCmdBar
Object

[out] The new command bar.

Returns

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

Implements

Applies to