Help Center

CRichEditCtx.PosFromCharmethod

Retrieves the client area coordinates of a specified character in a rich edit control.

Windowsmethoddocumented

Syntax

FUNCTION PosFromChar (BYVAL index as DWORD) AS .POINTL

Parameters

NameDescription
indexThe zero-based index of the character.

Return value

A POINTL structure with receives the client area coordinates of the character. The coordinates are in screen units and are relative to the upper-left corner of the control's client area.

Description

Retrieves the client area coordinates of a specified character in a rich edit control.

Remarks

A returned coordinate can be a negative value if the specified character is not displayed in the edit control's client area. The coordinates are truncated to integer values.

If the character is a line delimiter, the returned coordinates indicate a point just beyond the last visible character in the line. If the specified index is greater than the index of the last character in the control, the control returns -1.

Reference

  • Defined in AfxNova/CRichEditCtx.inc:2852
  • Documented in Windows/WIndows Controls/RichEdit/CRichEditCtx Class.md
  • Topic: CRichEditCtx Class