IVsTextManager2.GetActiveView2 Method
Returns the active or previously active view.
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)
Syntax
'宣言
Function GetActiveView2 ( _
fMustHaveFocus As Integer, _
pBuffer As IVsTextBuffer, _
grfIncludeViewFrameType As UInteger, _
<OutAttribute> ByRef ppView As IVsTextView _
) As Integer
'使用
Dim instance As IVsTextManager2
Dim fMustHaveFocus As Integer
Dim pBuffer As IVsTextBuffer
Dim grfIncludeViewFrameType As UInteger
Dim ppView As IVsTextView
Dim returnValue As Integer
returnValue = instance.GetActiveView2(fMustHaveFocus, _
pBuffer, grfIncludeViewFrameType, _
ppView)
int GetActiveView2(
int fMustHaveFocus,
IVsTextBuffer pBuffer,
uint grfIncludeViewFrameType,
out IVsTextView ppView
)
int GetActiveView2(
[InAttribute] int fMustHaveFocus,
[InAttribute] IVsTextBuffer^ pBuffer,
[InAttribute] unsigned int grfIncludeViewFrameType,
[OutAttribute] IVsTextView^% ppView
)
abstract GetActiveView2 :
fMustHaveFocus:int *
pBuffer:IVsTextBuffer *
grfIncludeViewFrameType:uint32 *
ppView:IVsTextView byref -> int
function GetActiveView2(
fMustHaveFocus : int,
pBuffer : IVsTextBuffer,
grfIncludeViewFrameType : uint,
ppView : IVsTextView
) : int
Parameters
- fMustHaveFocus
Type: System.Int32
[in] If true, then the current UI active view is returned. If false, then the last active view is returned, regardless of whether this view is currently UI active.
- pBuffer
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer
[in] Pass nulla null reference (Nothing in Visual Basic) for pBuffer to get the previously active code view, regardless of the text buffer that it was associated with. If you pass in a valid pointer to a buffer, then you are returned the last active view for that particular buffer.
- grfIncludeViewFrameType
Type: System.UInt32
[in] View frame type. For more information see _VIEWFRAMETYPE.
- ppView
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextView%
[out] Pointer to the IVsTextView interface.
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 IVsTextManager2::GetActiveView2(
[in] BOOL fMustHaveFocus,
[in] IVsTextBuffer *pBuffer,
[in] VIEWFRAMETYPE grfIncludeViewFrameType,
[out] IVsTextView **ppView
);
.NET Framework Security
- 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.