This documentation is archived and is not being maintained.

CreateToolWindow Method

Visual Studio .NET 2003

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

[Visual Basic .NET]
Public Function CreateToolWindow( _
   ByVal AddInInst As AddIn, _
   ByVal ProgID As String, _
   ByVal Caption As String, _
   ByVal GuidPosition As String, _
   ByRef DocObj As Object _
) As Window
[Visual Basic 6]
Function CreateToolWindow( _
   ByVal AddInInst As AddIn, _
   ByVal ProgID As String, _
   ByVal Caption As String, _
   ByVal GuidPosition As String, _
   ByRef DocObj As Object _
) As Window
[C++]
HRESULT __stdcall CreateToolWindow(
   AddIn* AddInInst,
   BSTR ProgID,
   BSTR Caption,
   BSTR GuidPosition,
   IDispatch** DocObj,
   /* [out, retval] */ Window** retVal
);
[C#]
public Window CreateToolWindow(
   AddIn AddInInst,
   string ProgID,
   string Caption,
   string GuidPosition,
   ref object DocObj
);
[JScript .NET]
public function CreateToolWindow(
   AddInInst : AddIn,
   ProgID : String,
   Caption : String,
   GuidPosition : String,
   DocObj : Object
) : Window

Parameters

AddInInInst
Required. An Addin object whose lifetime determines the lifetime of the tool window.
ProgId
Required. The programmatic ID of the Document object or ActiveX control.
Caption
Required. The caption for the new tool window.
GuidPosition
Required. A unique identifier for the new tool window, and it can be used as an index to Window.Item.
DocObj
Required. The Document object or control to be hosted in the tool window.

Return Value

Returns a Window object.

Example

For an example of how to use this method, see the ToolWindow sample on the Visual Studio .NET Automation Samples webpage: http://msdn.microsoft.com/vstudio/downloads/automation.asp. For information about creating ActiveX controls, see Creating an MFC ActiveX Control.

See Also

Applies To: Windows Collection

Show: