Help Center

CRichEditCtx.SetLimitTextmethod

Sets the current text limit for a rich edit control.

Windowsmethoddocumented

Syntax

SUB SetLimitText (BYVAL chMax AS DWORD)

Parameters

NameDescription
chMaxThe maximum number of characters the user can enter. If this parameter is zero, the text length is set to 64,000 characters.

Return value

The set property does not return a value.

Description

Sets the current text limit for a rich edit control. The text limit is the maximum amount of text that the user can type into the edit control.

Remarks

SetLimitText limits only the text the user can enter. It does not affect any text already in the edit control when the message is sent, nor does it affect the length of the text copied to the edit control by the SetText method. If an application uses the SetText method to place more text into an edit control than is specified by the SetLimitText method, the user can edit the entire contents of the edit control.

Reference

  • Defined in AfxNova/CRichEditCtx.inc:1383
  • Documented in Windows/WIndows Controls/RichEdit/CRichEditCtx Class.md
  • Topic: CRichEditCtx Class