CRichEditCtrl::GetTextRange

获取字符指定的范围。

int GetTextRange(
   int nFirst,
   int nLast,
   CString& refString 
) const;

参数

  • nFirst
    在第一个字符之前的字符位置索引在范围内。

  • nLast
    在最后一个字符后面的字符位置在范围内。

  • refString
    对于将接收该文本的 CString 对象的引用。

返回值

要复制的字符数的,不包括终止null字符)。

备注

有关更多信息,请参见 Windows SDK的 EM_GETTEXTRANGE

GetTextRange 支持rich edit 2.0功能。在参见 Windows SDK的 有关rich edit控件 有关更多信息。

要求

Header: afxcmn.h

请参见

参考

CRichEditCtrl选件类

层次结构图

CRichEditCtrl::GetTextLength

CRichEditCtrl::GetTextLengthEx