VsTextManagerClass.GetActiveView Method
Returns the active or previously active view.
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
Syntax
'宣言
Public Overridable Function GetActiveView ( _
fMustHaveFocus As Integer, _
pBuffer As IVsTextBuffer, _
<OutAttribute> ByRef ppView As IVsTextView _
) As Integer
'使用
Dim instance As VsTextManagerClass
Dim fMustHaveFocus As Integer
Dim pBuffer As IVsTextBuffer
Dim ppView As IVsTextView
Dim returnValue As Integer
returnValue = instance.GetActiveView(fMustHaveFocus, _
pBuffer, ppView)
public virtual int GetActiveView(
int fMustHaveFocus,
IVsTextBuffer pBuffer,
out IVsTextView ppView
)
public:
virtual int GetActiveView(
[InAttribute] int fMustHaveFocus,
[InAttribute] IVsTextBuffer^ pBuffer,
[OutAttribute] IVsTextView^% ppView
)
abstract GetActiveView :
fMustHaveFocus:int *
pBuffer:IVsTextBuffer *
ppView:IVsTextView byref -> int
override GetActiveView :
fMustHaveFocus:int *
pBuffer:IVsTextBuffer *
ppView:IVsTextView byref -> int
public function GetActiveView(
fMustHaveFocus : int,
pBuffer : IVsTextBuffer,
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.
- ppView
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextView%
[out] Pointer to the IVsTextView interface.
Return Value
Type: System.Int32
Implements
IVsTextManager.GetActiveView(Int32, IVsTextBuffer, IVsTextView%)
.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.