IVsTextManager2.NavigateToLineAndColumn2 方法

定义

在指定的缓冲区上查找或创建适当的视图,并将所选内容放在指定位置。

public:
 int NavigateToLineAndColumn2(Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer ^ pBuffer, Guid % guidDocViewType, int iStartRow, int iStartIndex, int iEndRow, int iEndIndex, System::UInt32 grfIncludeViewFrameType);
public int NavigateToLineAndColumn2 (Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer pBuffer, ref Guid guidDocViewType, int iStartRow, int iStartIndex, int iEndRow, int iEndIndex, uint grfIncludeViewFrameType);
abstract member NavigateToLineAndColumn2 : Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer * Guid * int * int * int * int * uint32 -> int
Public Function NavigateToLineAndColumn2 (pBuffer As IVsTextBuffer, ByRef guidDocViewType As Guid, iStartRow As Integer, iStartIndex As Integer, iEndRow As Integer, iEndIndex As Integer, grfIncludeViewFrameType As UInteger) As Integer

参数

pBuffer
IVsTextBuffer

中指向接口的指针 IVsTextBuffer

guidDocViewType
Guid

中标识视图的 GUID。 此值应始终为 LOGVIEWID_TextView

iStartRow
Int32

中要查找的所选内容的起始行。

iStartIndex
Int32

中要查找的选择项的起始索引。

iEndRow
Int32

中要查找的选定内容的结束行。

iEndIndex
Int32

中要查找的选择的结束索引。

grfIncludeViewFrameType
UInt32

中查看帧类型。 有关详细信息,请参阅 _VIEWFRAMETYPE

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

注解

COM 签名

从 textmgr:

HRESULT IVsTextManager2::NavigateToLineAndColumn2(  
   [in] IVsTextBuffer* pBuffer,  
   [in] REFGUID guidDocViewType,  
   [in] long iStartRow,  
   [in] CharIndex iStartIndex,  
   [in] long iEndRow,  
   [in] CharIndex iEndIndex,  
   [in] VIEWFRAMETYPE grfIncludeViewFrameType  
);  

若要使用此方法,请传入指向文本缓冲区的指针和该缓冲区中的行/列位置。 然后,该方法将查找缓冲区,并显示视图当前是否处于活动状态,然后将所选内容置于指定的文本范围。

适用于