Share via


CRichEditCtrl

A “rich edit control” is a window in which the user can enter and edit text. The text can be assigned character and paragraph formatting, and can include embedded OLE objects. Rich edit controls provide a programming interface for formatting text. However, an application must implement any user interface components necessary to make formatting operations available to the user.

The CRichEditCtrl class provides the functionality of the rich edit control. This Windows Common control (and therefore the CRichEditCtrl class) is available only to programs running under Windows 95 and Windows NT versions 3.51 and later.

Important   If you are using a rich edit control in a dialog box (regardless whether your application is SDI, MDI, or dialog-based), you must call AfxInitRichEdit once before the dialog box is displayed. A typical place to call this function is in your program’s InitInstance member function. You do not need to call it for each time you display the dialog box, only the first time. You do not have to call AfxInitRichEdit if you are working with CRichEditView.

For more information on using CRichEditCtrl, see and in the Visual C++ Programmer's Guide.

For an example of using a rich edit control in an MFC application, see the sample application.

#include <afxcmn.h>

Class MembersBase ClassHierarchy Chart

Sample   

See Also   CEdit, CRichEditView