Help Center

CRichEditCtx.GetCharFromPosmethod

Gets information about the character closest to a specified point in the client area of an edit control.

Windowsmethoddocumented

Syntax

FUNCTION GetCharFromPos (BYREF ptl AS .POINTL) AS LONG

Parameters

NameDescription
ptlA POINTL structure that contains the horizontal and vertical coordinates of a point in the control's client area. The coordinates are in screen units and are relative to the upper-left corner of the control's client area.

Return value

The return value specifies the zero-based character index of the character nearest the specified point. The return value indicates the last character in the edit control if the specified point is beyond the last character in the control.

Description

Gets information about the character closest to a specified point in the client area of an edit control.

Reference

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