共用方式為


ModelingEditorFactory.CreateEditorInstance Method

Definition

Creates a new editor.

public:
 virtual int CreateEditorInstance(System::UInt32 createFlags, System::String ^ fileName, System::String ^ physicalView, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ hierarchy, System::UInt32 itemId, IntPtr existingDocData, [Runtime::InteropServices::Out] IntPtr % docView, [Runtime::InteropServices::Out] IntPtr % docData, [Runtime::InteropServices::Out] System::String ^ % editorCaption, [Runtime::InteropServices::Out] Guid % cmdUI, [Runtime::InteropServices::Out] int % createDocWinFlags);
public int CreateEditorInstance (uint createFlags, string fileName, string physicalView, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy hierarchy, uint itemId, IntPtr existingDocData, out IntPtr docView, out IntPtr docData, out string editorCaption, out Guid cmdUI, out int createDocWinFlags);
abstract member CreateEditorInstance : uint32 * string * string * Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 * nativeint * nativeint * nativeint * string * Guid * int -> int
override this.CreateEditorInstance : uint32 * string * string * Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 * nativeint * nativeint * nativeint * string * Guid * int -> int
Public Function CreateEditorInstance (createFlags As UInteger, fileName As String, physicalView As String, hierarchy As IVsHierarchy, itemId As UInteger, existingDocData As IntPtr, ByRef docView As IntPtr, ByRef docData As IntPtr, ByRef editorCaption As String, ByRef cmdUI As Guid, ByRef createDocWinFlags As Integer) As Integer

Parameters

createFlags
UInt32

Flags defining how the editor should be created.

fileName
String

Name of the file to be edited.

physicalView
String

Name of the editor view.

hierarchy
IVsHierarchy

IVsHierarchy for the project containing the file.

itemId
UInt32

ID of the project node that represents the file.

existingDocData
IntPtr

nativeint

If the file has already been opened in VS this points to the file's data object.

docView
IntPtr

nativeint

A reference to the editor's view object.

docData
IntPtr

nativeint

A reference to the editor's doc object.

editorCaption
String

Caption for the editor.

cmdUI
Guid

Menu Guid.

createDocWinFlags
Int32

Flags to be passed to CreateDocumentWindow.

Returns

Implements

Applies to