Export (0) Print
Expand All

ITextDocument::RangeFromPoint method

Retrieves a range for the content at or nearest to the specified point on the screen.

Syntax


HRESULT RangeFromPoint(
  long x,
  long y,
  ITextRange **ppRange
);

Parameters

x

Type: long

The horizontal coordinate of the specified point, in screen coordinates.

y

Type: long

The vertical coordinate of the specified point, in screen coordinates.

ppRange

Type: ITextRange**

The text range that corresponds to the specified point.

Return value

Type: HRESULT

If the method succeeds, it returns S_OK. If the method fails, it returns one of the following COM error codes. For more information on COM error codes, see Error Handling in COM.

Return codeDescription
E_INVALIDARG

Invalid argument.

E_OUTOFMEMORY

Insufficient memory.

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Tom.h

DLL

Msftedit.dll

See also

Reference
ITextDocument
ITextRange
Expand
GetPoint
MoveStart
Conceptual
Text Object Model

 

 

Community Additions

ADD
Show:
© 2014 Microsoft