Partager via


Windows2.CreateToolWindow(AddIn, String, String, String, Object) Method

Definition

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.

ProgID
String

Required. The programmatic ID of the Document object or ActiveX control.

Caption
String

Required. The caption for the new tool window.

GuidPosition
String

Required. A unique identifier for the new tool window, and it can be used as an index to Windows.Item.

DocObj
Object

Required. The Document object or control to be hosted in the tool window.

Returns

A Window object.

Implements

Attributes

Remarks

If you attempt to set visibility states of the new tool window — such as height, width, or position — before the tool window is visible, you get an error. Make sure that the window is visible before attempting to set any such properties.

Applies to