Share via


Package.CreateToolWindow 方法

定義

多載

CreateToolWindow(Type, Int32, UInt32)

使用指定的識別碼,建立指定型別的工具視窗。

CreateToolWindow(Type, Int32, Object)

使用指定的識別碼,建立指定型別的工具視窗。

CreateToolWindow(Type, Int32, UInt32, Object, Guid)

使用指定的識別碼,建立指定型別的工具視窗。 這是應該呼叫 IVsUiShell.CreateToolWindow () 的唯一方法

CreateToolWindow(Guid, Int32)

使用指定的識別碼,建立指定型別的工具視窗。

CreateToolWindow(Type, Int32)

使用指定的識別碼,建立指定型別的工具視窗。

CreateToolWindow(Type, Int32, UInt32)

使用指定的識別碼,建立指定型別的工具視窗。

protected:
 Microsoft::VisualStudio::Shell::WindowPane ^ CreateToolWindow(Type ^ toolWindowType, int id, System::UInt32 flags);
protected Microsoft.VisualStudio.Shell.WindowPane CreateToolWindow (Type toolWindowType, int id, uint flags);
member this.CreateToolWindow : Type * int * uint32 -> Microsoft.VisualStudio.Shell.WindowPane
Protected Function CreateToolWindow (toolWindowType As Type, id As Integer, flags As UInteger) As WindowPane

參數

toolWindowType
Type

要建立的視窗類型

id
Int32

單一實例工具的實例識別碼或 0windows

flags
UInt32

__VSCREATETOOLWIN 傳遞至 IVsUiShell.CreateToolWindow 的視窗旗標

傳回

衍生自 的類別實例 ToolWindowPane

適用於

CreateToolWindow(Type, Int32, Object)

使用指定的識別碼,建立指定型別的工具視窗。

protected:
 virtual Microsoft::VisualStudio::Shell::WindowPane ^ CreateToolWindow(Type ^ toolWindowType, int id, System::Object ^ context);
protected virtual Microsoft.VisualStudio.Shell.WindowPane CreateToolWindow (Type toolWindowType, int id, object context);
abstract member CreateToolWindow : Type * int * obj -> Microsoft.VisualStudio.Shell.WindowPane
override this.CreateToolWindow : Type * int * obj -> Microsoft.VisualStudio.Shell.WindowPane
Protected Overridable Function CreateToolWindow (toolWindowType As Type, id As Integer, context As Object) As WindowPane

參數

toolWindowType
Type

要建立的視窗類型

id
Int32

單一實例工具的實例識別碼或 0windows

context
Object

傳遞至 ToolWindowPane 建構函式) 的工具視窗建立內容 (

傳回

衍生自 的類別實例 ToolWindowPane

適用於

CreateToolWindow(Type, Int32, UInt32, Object, Guid)

使用指定的識別碼,建立指定型別的工具視窗。 這是應該呼叫 IVsUiShell.CreateToolWindow () 的唯一方法

protected Microsoft.VisualStudio.Shell.WindowPane CreateToolWindow (Type toolWindowType, int id, uint flags, object context, Guid persistenceGuid = default);
member this.CreateToolWindow : Type * int * uint32 * obj * Guid -> Microsoft.VisualStudio.Shell.WindowPane
Protected Function CreateToolWindow (toolWindowType As Type, id As Integer, flags As UInteger, context As Object, Optional persistenceGuid As Guid = Nothing) As WindowPane

參數

toolWindowType
Type

要建立的視窗類型

id
Int32

單一實例工具的實例識別碼或 0windows

flags
UInt32

__VSCREATETOOLWIN 傳遞至 IVsUiShell.CreateToolWindow 的視窗旗標

context
Object

傳遞至 ToolWindowPane 建構函式) 的工具視窗建立內容 (

persistenceGuid
Guid

工具視窗的持續性 Guid。 如果未指定或符合 EmptytoolWindowType 則會使用 的 GUID 屬性做為持續性 Guid。

傳回

衍生自 的類別實例 ToolWindowPane

適用於

CreateToolWindow(Guid, Int32)

使用指定的識別碼,建立指定型別的工具視窗。

protected:
 virtual int CreateToolWindow(Guid % toolWindowType, int id);
protected virtual int CreateToolWindow (ref Guid toolWindowType, int id);
abstract member CreateToolWindow : Guid * int -> int
override this.CreateToolWindow : Guid * int -> int
Protected Overridable Function CreateToolWindow (ByRef toolWindowType As Guid, id As Integer) As Integer

參數

toolWindowType
Guid

要建立的視窗類型

id
Int32

單一實例工具的實例識別碼或 0windows

傳回

用於工具視窗建立的 HRESULT

適用於

CreateToolWindow(Type, Int32)

使用指定的識別碼,建立指定型別的工具視窗。

protected:
 virtual Microsoft::VisualStudio::Shell::WindowPane ^ CreateToolWindow(Type ^ toolWindowType, int id);
protected virtual Microsoft.VisualStudio.Shell.WindowPane CreateToolWindow (Type toolWindowType, int id);
abstract member CreateToolWindow : Type * int -> Microsoft.VisualStudio.Shell.WindowPane
override this.CreateToolWindow : Type * int -> Microsoft.VisualStudio.Shell.WindowPane
Protected Overridable Function CreateToolWindow (toolWindowType As Type, id As Integer) As WindowPane

參數

toolWindowType
Type

要建立的視窗類型

id
Int32

單一實例工具的實例識別碼或 0windows

傳回

衍生自 的類別實例 ToolWindowPane

例外狀況

toolWindowType 為 null。

id 小於 0。 toolWindowType 不是衍生自 ToolWindowPane 類型。

備註

方法 CreateToolWindow 會建立指定工具視窗的實例。 實作 Visual Studio 介面工具視窗建立程式碼以及 FindToolWindow 方法時,這會在 Package 基類中使用。

適用於