CRichEdit.PosFromCharmethod
Retrieves the client area coordinates of a specified character in a rich edit control.
Syntax
SUB PosFromChar (BYVAL hRichEdit AS HWND, BYVAL pt AS POINTL PTR, BYVAL index as DWORD)
Parameters
| Name | Description | |
|---|---|---|
hRichEdit | The handle of the rich edit control. | |
pt | A pointer to a POINTL structure that 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. | |
index | The zero-based index of the character. |
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/CRichEdit.inc:873
- Documented in Windows/WIndows Controls/CRichEdit Class.md
- Topic: CRichEdit Class