Windows.CreateToolWindow(AddIn, String, String, String, Object) 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.
Caution
AddIn related extension points are no longer supported in Visual Studio.
Creates a new tool window containing the specified Document object or ActiveX control.
public:
EnvDTE::Window ^ CreateToolWindow(EnvDTE::AddIn ^ AddInInst, System::String ^ ProgID, System::String ^ Caption, System::String ^ GuidPosition, [Runtime::InteropServices::Out] System::Object ^ % DocObj);
EnvDTE::Window CreateToolWindow(EnvDTE::AddIn const & AddInInst, std::wstring const & ProgID, std::wstring const & Caption, std::wstring const & GuidPosition, [Runtime::InteropServices::Out] winrt::Windows::Foundation::IInspectable const & & DocObj);
[System.Runtime.InteropServices.DispId(300)]
public EnvDTE.Window CreateToolWindow (EnvDTE.AddIn AddInInst, string ProgID, string Caption, string GuidPosition, out object DocObj);
[System.Runtime.InteropServices.DispId(300)]
[System.Obsolete("AddIn related extension points are no longer supported in Visual Studio.")]
public EnvDTE.Window CreateToolWindow (EnvDTE.AddIn AddInInst, string ProgID, string Caption, string GuidPosition, out object DocObj);
[<System.Runtime.InteropServices.DispId(300)>]
abstract member CreateToolWindow : EnvDTE.AddIn * string * string * string * obj -> EnvDTE.Window
[<System.Runtime.InteropServices.DispId(300)>]
[<System.Obsolete("AddIn related extension points are no longer supported in Visual Studio.")>]
abstract member CreateToolWindow : EnvDTE.AddIn * string * string * string * obj -> EnvDTE.Window
Public Function CreateToolWindow (AddInInst As AddIn, ProgID As String, Caption As String, GuidPosition As String, ByRef DocObj As Object) As Window
Parameters
- AddInInst
- AddIn
Required. An AddIn object whose lifetime determines the lifetime of the tool window.
- Caption
- String
Required. The caption for the new tool window.
- GuidPosition
- String
Required. A unique identifier for the new tool window, which can be used as an index to Item(Object).
Returns
A Window object.
- Attributes
Remarks
If you attempt to set any of the visibility states of the new tool window — such as height, width, or position — before the tool window is visible, you get an error. Therefore, make sure that the window is visible before attempting to set any such properties.
For information about creating ActiveX controls, see Creating an MFC ActiveX Control.