Udostępnij za pośrednictwem


IVsTextManager.GetActiveView(Int32, IVsTextBuffer, IVsTextView) Method

Definition

Returns the active or previously active view.

public:
 int GetActiveView(int fMustHaveFocus, Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer ^ pBuffer, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ % ppView);
public:
 int GetActiveView(int fMustHaveFocus, Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer ^ pBuffer, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ &  ppView);
int GetActiveView(int fMustHaveFocus, Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer const & pBuffer, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsTextView const & & ppView);
public int GetActiveView (int fMustHaveFocus, Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer pBuffer, out Microsoft.VisualStudio.TextManager.Interop.IVsTextView ppView);
abstract member GetActiveView : int * Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer * IVsTextView -> int
Public Function GetActiveView (fMustHaveFocus As Integer, pBuffer As IVsTextBuffer, 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.

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 IVsTextManager::GetActiveView(  
   [in] BOOL fMustHaveFocus,  
   [in] IVsTextBuffer *pBuffer,  
   [out] IVsTextView **ppView  
);  

Applies to