共用方式為


IVsCodeWindow.GetPrimaryView(IVsTextView) Method

Definition

Returns the top (or primary) view of a split code window.

public:
 int GetPrimaryView([Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ % ppView);
public:
 int GetPrimaryView([Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ &  ppView);
int GetPrimaryView([Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsTextView const & & ppView);
public int GetPrimaryView (out Microsoft.VisualStudio.TextManager.Interop.IVsTextView ppView);
abstract member GetPrimaryView : IVsTextView -> int
Public Function GetPrimaryView (ByRef ppView As IVsTextView) As Integer

Parameters

ppView
IVsTextView

[out] Pointer to IVsTextView interface of the primary text view.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

Use this method to get a pointer to the primary view if the editor contains one or two views separated by a splitter. To access the secondary view in a split code window, call GetSecondaryView.

COM Signature

From textmgr.idl:

HRESULT IVsCodeWindow::GetPrimaryView(  
   [out] IVsTextView **ppView  
);  

Applies to