共用方式為


IVsIntellisenseHost.GetContextLocation Method

Definition

Gets the bounding rectangle for the IntelliSense context.

public:
 int GetContextLocation(int iPos, int iLen, int fUseCaretPosition, cli::array <Microsoft::VisualStudio::OLE::Interop::RECT> ^ prc, [Runtime::InteropServices::Out] int % piTopX);
int GetContextLocation(int iPos, int iLen, int fUseCaretPosition, std::Array <Microsoft::VisualStudio::OLE::Interop::RECT> const & prc, [Runtime::InteropServices::Out] int & piTopX);
public int GetContextLocation (int iPos, int iLen, int fUseCaretPosition, Microsoft.VisualStudio.OLE.Interop.RECT[] prc, out int piTopX);
abstract member GetContextLocation : int * int * int * Microsoft.VisualStudio.OLE.Interop.RECT[] * int -> int
Public Function GetContextLocation (iPos As Integer, iLen As Integer, fUseCaretPosition As Integer, prc As RECT(), ByRef piTopX As Integer) As Integer

Parameters

iPos
Int32

[in] The position of the context.

iLen
Int32

[in] The length of the context.

fUseCaretPosition
Int32

[in] Flag indicating that the context position is determined by the current caret position. True indicates use the current caret position.

prc
RECT[]

[out] The bounding rectangle for the IntelliSense context.

piTopX
Int32

[out] The top line of the context.

Returns

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

Remarks

C++

From singlefileeditor.idl:

HRESULT IVsIntellisenseHost::GetContextLocation([in]long iPos, [in]long iLen, [in] bool fUseCaretPosition, [out]RECT *prc, [out]long *piTopX);

Applies to