다음을 통해 공유


IVsProfferCommands4.AddCommandBarControl Method

Definition

Adds a control to a command bar.

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

Parameters

pszCmdNameCanonical
String

[in] The fully qualified (canonical) name of the control to add.

pCmdBarParent
Object

[in] The parent command bar.

dwIndex
UInt32

[in] The index location at which to place the control.

dwCmdType
UInt32

[in] A value from the vsCommandBarType enumeration.

ppCmdBarCtrl
Object

[out] The newly added control.

Returns

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

Implements

Applies to