Windows2.CreateToolWindow Method

Creates a new tool window containing the specified Document object or ActiveX control.

Namespace:  EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

Syntax

'Declaration
Function CreateToolWindow ( _
    AddInInst As AddIn, _
    ProgID As String, _
    Caption As String, _
    GuidPosition As String, _
    <OutAttribute> ByRef DocObj As Object _
) As Window
Window CreateToolWindow(
    AddIn AddInInst,
    string ProgID,
    string Caption,
    string GuidPosition,
    out Object DocObj
)
Window^ CreateToolWindow(
    [InAttribute] AddIn^ AddInInst, 
    [InAttribute] String^ ProgID, 
    [InAttribute] String^ Caption, 
    [InAttribute] String^ GuidPosition, 
    [InAttribute] [OutAttribute] Object^% DocObj
)
abstract CreateToolWindow : 
        AddInInst:AddIn * 
        ProgID:string * 
        Caption:string * 
        GuidPosition:string * 
        DocObj:Object byref -> Window 
function CreateToolWindow(
    AddInInst : AddIn, 
    ProgID : String, 
    Caption : String, 
    GuidPosition : String, 
    DocObj : Object
) : Window

Parameters

  • AddInInst
    Type: EnvDTE.AddIn
    Required. An AddIn object whose lifetime determines the lifetime of the tool window.
  • Caption
    Type: System.String
    Required. The caption for the new tool window.
  • GuidPosition
    Type: System.String
    Required. A unique identifier for the new tool window, and it can be used as an index to Windows.Item.

Return Value

Type: EnvDTE.Window
A Window object.

Implements

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

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.

For an example of how to use this method, see the ToolWindow sample on the Visual Studio Automation Samples Web page. For information about creating ActiveX controls, see Creating an MFC ActiveX Control.

.NET Framework Security

See Also

Reference

Windows2 Interface

EnvDTE80 Namespace