Compartir a través de


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)

Syntax

'Declaración
Function Initialize ( _
    pBuffer As IVsTextLines, _
    hwndParent As IntPtr, _
    InitFlags As UInteger, _
    pInitView As INITVIEW() _
) As Integer
int Initialize(
    IVsTextLines pBuffer,
    IntPtr hwndParent,
    uint InitFlags,
    INITVIEW[] pInitView
)
int Initialize(
    [InAttribute] IVsTextLines^ pBuffer, 
    [InAttribute] IntPtr hwndParent, 
    [InAttribute] unsigned int InitFlags, 
    [InAttribute] array<INITVIEW>^ pInitView
)
abstract Initialize : 
        pBuffer:IVsTextLines * 
        hwndParent:IntPtr * 
        InitFlags:uint32 * 
        pInitView:INITVIEW[] -> int 
function Initialize(
    pBuffer : IVsTextLines, 
    hwndParent : IntPtr, 
    InitFlags : uint, 
    pInitView : INITVIEW[]
) : int

Parameters

  • hwndParent
    Type: System.IntPtr
    [in] Specifies a handle to the parent window.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

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.

.NET Framework Security

See Also

Reference

IVsTextView Interface

Microsoft.VisualStudio.TextManager.Interop Namespace