Export (0) Print
Expand All

IVsTextView.Initialize Method

Creates the view and allows clients to specify one or more TextViewInitFlags options.

Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop (in microsoft.visualstudio.textmanager.interop.dll)

int Initialize (
	[InAttribute] IVsTextLines pBuffer,
	[InAttribute] IntPtr hwndParent,
	[InAttribute] uint InitFlags,
	[InAttribute] INITVIEW[] pInitView
)
int Initialize (
	/** @attribute InAttribute() */ IVsTextLines pBuffer, 
	/** @attribute InAttribute() */ IntPtr hwndParent, 
	/** @attribute InAttribute() */ UInt32 InitFlags, 
	/** @attribute InAttribute() */ INITVIEW[] pInitView
)
function Initialize (
	pBuffer : IVsTextLines, 
	hwndParent : IntPtr, 
	InitFlags : uint, 
	pInitView : INITVIEW[]
) : int

Parameters

pBuffer

[in] Pointer to a text buffer object to attach the view to.

hwndParent

[in] Specifies a handle to the parent window.

InitFlags

[in] Specifies view options. For a list of InitFlags values, see TextViewInitFlags.

pInitView

[in] Pointer to the view you want to initialize.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

COM Signature

From textmgr.idl:

HRESULT IVsTextView::Initialize(
   [in] IVsTextLines *pBuffer,
   [in] HWND hwndParent,
   [in] DWORD InitFlags,
   [in] const INITVIEW *pInitView
);

When you hook up your language service to the core text editor, the editor automatically provides you with a view, which it initializes. You only need to call Initialize to initialize a view that you created separately and hooked up later.

Community Additions

ADD
Show:
© 2014 Microsoft