Partager via


CRichEditCtrl::SetTextMode

Sets the text mode or undo and redo level for a rich edit control.

BOOL SetTextMode(
   UINT fMode 
);

Parameters

  • fMode
    Specifies the new settings for the control's text mode and undo level parameters. For a list of the possible values, see the mode parameter for EM_SETTEXTMODE in the Windows SDK.

Return Value

Zero if successful, otherwise nonzero.

Remarks

For a description of the text modes, see EM_SETTEXTMODE in the Windows SDK.

This member function fails if the control contains text. To make sure the control is empty, send a WM_SETTEXT message with an empty string.

Requirements

Header: afxcmn.h

See Also

Concepts

CRichEditCtrl Class

CRichEditCtrl Members

Hierarchy Chart

CRichEditCtrl::GetTextMode