Help Center

CRichEditCtx.GetTextModemethod

Windowsmethoddocumented

Syntax

FUNCTION GetTextMode () AS DWORD
Also documented as TextMode — one description covers them all.

Parameters

NameDescription
valuesOne or more values from the TEXTMODE enumeration type. The values specify the new settings for the control's text mode and undo level parameters.

Return value

(GET) The return value is one or more values from the TEXTMODE enumeration type. The values indicate the current text mode and undo level of the control.

(SET) If the message succeeds, the result code is zero. If the message fails, the result code is a nonzero value.

Description

Gets/sets the current text mode and undo level of a rich edit control.

Remarks

In rich text mode, a rich edit control has standard rich edit functionality. However, in plain text mode, the control is similar to a standard edit control:

  • The text in a plain text control can have only one format (such as Bold, 10pt Arial).
  • The user cannot paste rich text formats, such as Rich Text Format (RTF) or embedded objects into a plain text control.
  • Rich text mode controls always have a default end-of-document marker or carriage return, to format paragraphs. Plain text controls, on the other hand, do not need the default, end-of-document marker, so it is omitted.
  • The control must contain no text when it receives the EM_SETTEXTMODE message. To ensure there is no text, call the (SET) Text property with an empty string ("").

Example

(GET) PROPERTY TextMode () AS DWORD (SET) PROPERTY TextMode (BYVAL values AS LONG)

Reference

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