Help Center

CRichEdit.ExLimitTextmethod

Sets an upper limit to the amount of text the user can type or paste into a rich edit control.

Windowsmethoddocumented

Syntax

SUB ExLimitText (BYVAL hRichEdit AS HWND, BYVAL dwLimit AS DWORD)

Parameters

NameDescription
hRichEditThe handle of the rich edit control.
dwLimitSpecifies the maximum amount of text that can be entered. If this parameter is zero, the default maximum is used, which is 64K characters. A COM object counts as a single character.

Description

Sets an upper limit to the amount of text the user can type or paste into a rich edit control.

Remarks

The text limit set by the ExLimitText message does not limit the amount of text that you can stream into a rich edit control using the StreamIn message with the pedst parameter set to SF_TEXT. However, it does limit the amount of text that you can stream into a rich edit control using the StreamIn message with the pedst parameter set set to SF_RTF.

Before ExLimitText is called, the default limit to the amount of text a user can enter is 32,767 characters.

Reference

  • Defined in AfxNova/CRichEdit.inc:299
  • Documented in Windows/WIndows Controls/CRichEdit Class.md
  • Topic: CRichEdit Class