IVsProfferCommands3.AddCommandBarControl 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 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 of the position to place the control.
- dwCmdType
- UInt32
[in] A value from the vsCommandBarType enumeration.
- ppCmdBarCtrl
- Object
[out] The new control.
Returns
If the method succeeds, it returns S_OK. If it fails, it returns an error code.