Help Center

CRichEditCtx.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 dwLimit AS DWORD)

Parameters

NameDescription
dwLimitSpecifies the maximum amount of text that can be entered. If this parameter is zero, the default maximum is used, which is 64K characters. If this parameter is -1 (&hFFFFFFFF), raises the the 32,767 default characters limit to no limit. A COM object counts as a single character.

Return value

This method does not return a value.

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 method does not limit the amount of text that you can stream into a rich edit control using the StreamIn method 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 method 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/CRichEditCtx.inc:2004
  • Documented in Windows/WIndows Controls/RichEdit/CRichEditCtx Class.md
  • Topic: CRichEditCtx Class