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

Definition

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);
abstract member CreateToolWindow : EnvDTE.AddIn * string * string * string *  -> 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 AddIn AddIn AddIn AddIn

Required. An AddIn object whose lifetime determines the lifetime of the tool window.

ProgID
String String String String String

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

Caption
String String String String String

Required. The caption for the new tool window.

GuidPosition
String String String String String

Required. A unique identifier for the new tool window, which can be used as an index to Item(Object).

DocObj
Object Object Object Object Object

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

Returns

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.

Applies to