Freigeben über


IVsTextManager2.GetActiveView2 Method

Definition

Returns the active or previously active view.

public:
 int GetActiveView2(int fMustHaveFocus, Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer ^ pBuffer, System::UInt32 grfIncludeViewFrameType, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ % ppView);
public:
 int GetActiveView2(int fMustHaveFocus, Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer ^ pBuffer, unsigned int grfIncludeViewFrameType, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ &  ppView);
int GetActiveView2(int fMustHaveFocus, Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer const & pBuffer, unsigned int grfIncludeViewFrameType, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsTextView const & & ppView);
public int GetActiveView2 (int fMustHaveFocus, Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer pBuffer, uint grfIncludeViewFrameType, out Microsoft.VisualStudio.TextManager.Interop.IVsTextView ppView);
abstract member GetActiveView2 : int * Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer * uint32 * IVsTextView -> int
Public Function GetActiveView2 (fMustHaveFocus As Integer, pBuffer As IVsTextBuffer, grfIncludeViewFrameType As UInteger, ByRef ppView As IVsTextView) As Integer

Parameters

fMustHaveFocus
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
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.

grfIncludeViewFrameType
UInt32

[in] View frame type. For more information see _VIEWFRAMETYPE.

ppView
IVsTextView

[out] Pointer to the IVsTextView interface.

Returns

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  
);  

Applies to