Help Center

CRichEdit.SetLimitTextmethod

Sets the text limit of a rich edit control. The text limit is the maximum amount of text, in characters, that the user can type into the edit control.

Windowsmethoddocumented

Syntax

SUB SetLimitText (BYVAL hRichEdit AS HWND, BYVAL chMax AS DWORD)

Parameters

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

Description

Sets the text limit of a rich edit control. The text limit is the maximum amount of text, in characters, that the user can type into the edit control.

Remarks

The SetLimitText message 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 message. If an application uses the SetText message to place more text into an edit control than is specified in the SetLimitText message, the user can edit the entire contents of the edit control.

Reference

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