ITextDocument2::RangeFromPoint2 method (tom.h)

Retrieves the degenerate range at (or nearest to) a particular point on the screen.

Syntax

HRESULT RangeFromPoint2(
  long        x,
  long        y,
  long        Type,
  ITextRange2 **ppRange
);

Parameters

x

Type: long

The x-coordinate of a point, in screen coordinates.

y

Type: long

The y-coordinate of a point, in screen coordinates.

Type

Type: long

The alignment type of the specified point. For a list of valid values, see ITextRange::GetPoint.

ppRange

Type: ITextRange2**

Return value

Type: HRESULT

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.

Requirements

   
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header tom.h
DLL Msftedit.dll

See also

ITextDocument2