共用方式為


CRichEditCtrl::PosFromChar

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

CPoint PosFromChar(
   UINT nChar 
) const;

Parameters

  • nChar
    The zero-based index of the character.

Return Value

The position of the character, (x, y). For a single-line edit control, the y-coordinate is always zero.

Remarks

For more information, see EM_POSFROMCHAR in the Windows SDK.

Requirements

Header: afxcmn.h

See Also

Concepts

CRichEditCtrl Class

CRichEditCtrl Members

Hierarchy Chart

CRichEditCtrl::GetCharPos