Creates a modeling editor.
Namespace: Microsoft.VisualStudio.Modeling.Shell
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Shell (in Microsoft.VisualStudio.Modeling.Sdk.Shell.dll)
Syntax
'宣言
Public Function CreateEditorInstance ( _
createFlags As UInteger, _
fileName As String, _
physicalView As String, _
hierarchy As IVsHierarchy, _
itemId As UInteger, _
existingDocData As IntPtr, _
<OutAttribute> ByRef docView As IntPtr, _
<OutAttribute> ByRef docData As IntPtr, _
<OutAttribute> ByRef editorCaption As String, _
<OutAttribute> ByRef cmdUI As Guid, _
<OutAttribute> ByRef createDocWinFlags As Integer _
) As Integer
'使用
Dim instance As ModelingEditorFactory
Dim createFlags As UInteger
Dim fileName As String
Dim physicalView As String
Dim hierarchy As IVsHierarchy
Dim itemId As UInteger
Dim existingDocData As IntPtr
Dim docView As IntPtr
Dim docData As IntPtr
Dim editorCaption As String
Dim cmdUI As Guid
Dim createDocWinFlags As Integer
Dim returnValue As Integer
returnValue = instance.CreateEditorInstance(createFlags, _
fileName, physicalView, hierarchy, _
itemId, existingDocData, docView, _
docData, editorCaption, cmdUI, createDocWinFlags)
public int CreateEditorInstance(
uint createFlags,
string fileName,
string physicalView,
IVsHierarchy hierarchy,
uint itemId,
IntPtr existingDocData,
out IntPtr docView,
out IntPtr docData,
out string editorCaption,
out Guid cmdUI,
out int createDocWinFlags
)
public:
virtual int CreateEditorInstance(
unsigned int createFlags,
String^ fileName,
String^ physicalView,
IVsHierarchy^ hierarchy,
unsigned int itemId,
IntPtr existingDocData,
[OutAttribute] IntPtr% docView,
[OutAttribute] IntPtr% docData,
[OutAttribute] String^% editorCaption,
[OutAttribute] Guid% cmdUI,
[OutAttribute] int% createDocWinFlags
) sealed
public final function CreateEditorInstance(
createFlags : uint,
fileName : String,
physicalView : String,
hierarchy : IVsHierarchy,
itemId : uint,
existingDocData : IntPtr,
docView : IntPtr,
docData : IntPtr,
editorCaption : String,
cmdUI : Guid,
createDocWinFlags : int
) : int
Parameters
createFlags
Type: System.UInt32The flags that define how the modeling editor is created.
fileName
Type: System.StringThe name of the document to open for editing.
physicalView
Type: System.StringThe name of the modeling editor view.
hierarchy
Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchyThe IVsHierarchy for the project that contains the document.
itemId
Type: System.UInt32The ID of the document.
existingDocData
Type: System.IntPtrIf the document is already open in Visual Studio, the document.
docView
Type: System.IntPtr%The view for the document.
docData
Type: System.IntPtr%The document.
editorCaption
Type: System.String%The caption for the modeling editor.
cmdUI
Type: System.Guid%The GUID that is assigned to the modeling editor.
createDocWinFlags
Type: System.Int32%The flags to pass to CreateDocumentWindow.
Return Value
Type: System.Int32
The modeling editor.
Implements
Remarks
This method is part of IVsEditorFactory and is called by Visual Studio to create the modeling editor. ModelingEditorFactory calls CreateDocData and CreateDocView as necessary.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.