IVsProfferCommands4.AddCommandBarControl 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
向命令栏添加控件。
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
参数
- pszCmdNameCanonical
- String
中要添加的控件的完全限定 (规范) 名称。
- pCmdBarParent
- Object
中父命令栏。
- dwIndex
- UInt32
中要放置控件的索引位置。
- dwCmdType
- UInt32
中枚举中的一个值 vsCommandBarType 。
- ppCmdBarCtrl
- Object
弄新添加的控件。
返回
如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。