Share via


IScope::GetDataTipText Method

Returns a data tip for a given span of text.

HRESULT GetDataTipText ( 
   long line,
   long idx,
   INames* names,
   BSTR* text
);

Parameters

  • line
    [in] Specifies the line for which to determine the data tip (that is, the line containing the cursor).

  • idx
    [in] Specifies an index position within the line for which to determine the data tip. The line index is zero-based and refers to the location of the cursor within the line.

  • names
    [in] Specifies a qualified name (a list of name and selector pairs). For more information, see the INames Interface.

  • text
    [out] Returns the text of the data tip.

Return Value

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

Remarks

This method returns a description in the text parameter. The text should contain a description of the qualified names. For example, if the names parameter contains "X.length", then the description might be "int IX::length". This text is shown when the user hovers the mouse over an identifier. If the debugger is running, the name is evaluated and the resulting value is concatenated to the returned description.

In response to the ParseReason Enumeration value of ReasonQuickInfo, the qualified name specified in the names parameter is obtained by parsing the identifier(s) at the specified location. This qualified name is then used in the IScope::GetDataTipText method to look up the identifier as found in the last full parse operation.

See Also

Reference

IScope Interface

INames Interface

ParseReason Enumeration