EditorFactory.CreateEditorView 方法

定义

返回 docView IUnknown COM 对象。

public:
 virtual IntPtr CreateEditorView(System::String ^ moniker, Microsoft::VisualStudio::TextManager::Interop::IVsTextLines ^ buffer, System::String ^ physicalView, [Runtime::InteropServices::Out] System::String ^ % editorCaption, [Runtime::InteropServices::Out] Guid % cmdUI);
public virtual IntPtr CreateEditorView (string moniker, Microsoft.VisualStudio.TextManager.Interop.IVsTextLines buffer, string physicalView, out string editorCaption, out Guid cmdUI);
abstract member CreateEditorView : string * Microsoft.VisualStudio.TextManager.Interop.IVsTextLines * string * string * Guid -> nativeint
override this.CreateEditorView : string * Microsoft.VisualStudio.TextManager.Interop.IVsTextLines * string * string * Guid -> nativeint
Public Overridable Function CreateEditorView (moniker As String, buffer As IVsTextLines, physicalView As String, ByRef editorCaption As String, ByRef cmdUI As Guid) As IntPtr

参数

moniker
String

项目系统中文档的名字对象标识符的字符串格式。 对于文件文档,这始终是文件的路径。

buffer
IVsTextLines

用于设置代码窗口中所有视图的文本缓冲区的缓冲区。

physicalView
String

物理视图的名称。

editorCaption
String

文档编辑器为文档窗口定义的初始标题。 这通常是用方括号括起来的字符串,例如 "[窗体]"。 此值作为输入参数传递到 CreateDocumentWindow(UInt32, String, IVsUIHierarchy, UInt32, IntPtr, IntPtr, Guid, String, Guid, IServiceProvider, String, String, Int32[], IVsWindowFrame) 方法。 如果该文件为 [ReadOnly],则在加载该文件的过程中将设置标题。

返回

IntPtr

nativeint

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

适用于