Freigeben über


IVsTextView.GetWordExtent(Int32, Int32, UInt32, TextSpan[]) Method

Definition

Returns the current word extent.

public:
 int GetWordExtent(int iLine, int iCol, System::UInt32 dwFlags, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ pSpan);
public:
 int GetWordExtent(int iLine, int iCol, unsigned int dwFlags, Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ pSpan);
int GetWordExtent(int iLine, int iCol, unsigned int dwFlags, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & pSpan);
public int GetWordExtent (int iLine, int iCol, uint dwFlags, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] pSpan);
abstract member GetWordExtent : int * int * uint32 * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] -> int
Public Function GetWordExtent (iLine As Integer, iCol As Integer, dwFlags As UInteger, pSpan As TextSpan()) As Integer

Parameters

iLine
Int32

[in] Line index for the lines that contains the word.

iCol
Int32

[in] Column index for the word.

dwFlags
UInt32

[in] Flags specifying how the word extent is determined. For a list of dwFlags values, see WORDEXTFLAGS.

pSpan
TextSpan[]

[out] Span of text identifying the word extent.

Returns

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

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextView::GetWordExtent(  
   [in] long iLine,  
   [in] CharIndex iCol,  
   [in] DWORD dwFlags,  
   [out] TextSpan *pSpan  
);  

The word extent is wherever the editor determines the word boundary to be. For example, if you place your cursor in within a word and then double-click, the core text editor assumes that the word extent is that entire word.

Applies to