VsTextPackageClass::GetActiveView Method (Int32, IVsTextBuffer^, IVsTextView^)
Visual Studio 2015
Returns the active or previously active view.
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
public: virtual int GetActiveView( int fMustHaveFocus, IVsTextBuffer^ pBuffer, [OutAttribute] IVsTextView^% ppView )
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 null 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::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Show: