CRichEditCtrl Class
Provides the functionality of the rich edit control.
class CRichEditCtrl : public CWnd
Members
Public Constructors
Name |
Description |
---|---|
Constructs a CRichEditCtrl object. |
Public Methods
Name |
Description |
---|---|
Determines if the contents of the Clipboard can be pasted into this rich edit control. |
|
Determines whether there are any actions in the control's redo queue. |
|
Determines if an editing operation can be undone. |
|
Retrieves information about the character closest to a specified point in the client area of an edit control. |
|
Clears the current selection. |
|
Copies the current selection to the Clipboard. |
|
Creates the Windows rich edit control and associates it with this CRichEditCtrl object. |
|
Creates the Windows rich edit control with the specified extended Windows styles and associates it with this CRichEditCtrl object. |
|
Cuts the current selection to the Clipboard. |
|
Displays a portion of the contents of this CRichEditCtrl object. |
|
Resets (clears) the undo flag of this CRichEditCtrl object. |
|
Locates text within this CRichEditCtrl object. |
|
Finds the next word break before or after the specified character position, or retrieves information about the character at that position. |
|
Formats a range of text for the target output device. |
|
Determines the location of a given character within this CRichEditCtrl object. |
|
Retrieves the current default character formatting attributes in this CRichEditCtrl object. |
|
Retrieves the event mask for this CRichEditCtrl object. |
|
Determines the topmost visible line in this CRichEditCtrl object. |
|
Retrieves a pointer to the IRichEditOle interface for this rich edit control. |
|
Gets the limit on the amount of text a user can enter into this CRichEditCtrl object. |
|
Retrieves a line of text from this CRichEditCtrl object. |
|
Retrieves the number of lines in this CRichEditCtrl object. |
|
Determines if the contents of this CRichEditCtrl object have changed since the last save. |
|
Retrieves the rich edit control options. |
|
Retrieves the paragraph formatting attributes in the current selection in this CRichEditCtrl object. |
|
Retrieves the current punctuation characters for the rich edit control. This message is available only in Asian-language versions of the operating system. |
|
Retrieves the formatting rectangle for this CRichEditCtrl object. |
|
Retrieves the type of the next action, if any, in the control's redo queue. |
|
Gets the starting and ending positions of the current selection in this CRichEditCtrl object. |
|
Retrieves the character formatting attributes in the current selection in this CRichEditCtrl object. |
|
Retrieves the type of contents in the current selection in this CRichEditCtrl object. |
|
Gets the text of the current selection in this CRichEditCtrl object |
|
Retrieves the length of the text, in characters, in this CRichEditCtrl object. Does not include the terminating null character. |
|
Retrieves the number of characters or bytes in the rich edit view. Accepts a list of flags to indicate the method of determining length of the text in a rich edit control |
|
Retrieves the current text mode and undo level of a rich edit control. |
|
Retrieves the specified range of text. |
|
Retrieves the type of the next undo action, if any. |
|
Retrieves the current word wrapping and word breaking options for the rich edit control. This message is available only in Asian-language versions of the operating system. |
|
Shows or hides the current selection. |
|
Limits the amount of text a user can enter into the CRichEditCtrl object. |
|
Determines which line contains the given character. |
|
Retrieves the character index of a given line in this CRichEditCtrl object. |
|
Retrieves the length of a given line in this CRichEditCtrl object. |
|
Scrolls the text in this CRichEditCtrl object. |
|
Inserts the contents of the Clipboard into this rich edit control. |
|
Inserts the contents of the Clipboard into this rich edit control in the specified data format. |
|
Retrieves the client area coordinates of a specified character in an edit control. |
|
Redoes the next action in the control's redo queue. |
|
Replaces the current selection in this CRichEditCtrl object with specified text. |
|
Forces this CRichEditCtrl object to send request resize notifications. |
|
Indicates if the auto URL detection is active in a rich edit control. |
|
Sets the background color in this CRichEditCtrl object. |
|
Sets the current default character formatting attributes in this CRichEditCtrl object. |
|
Sets the event mask for this CRichEditCtrl object. |
|
Sets or clears the modification flag for this CRichEditCtrl object. |
|
Sets the IRichEditOleCallback COM object for this rich edit control. |
|
Sets the options for this CRichEditCtrl object. |
|
Sets the paragraph formatting attributes in the current selection in this CRichEditCtrl object. |
|
Sets the punctuation characters for a rich edit control. This message is available only in Asian-language versions of the operating system. |
|
Sets the read-only option for this CRichEditCtrl object. |
|
Sets the formatting rectangle for this CRichEditCtrl object. |
|
Sets the selection in this CRichEditCtrl object. |
|
Sets the character formatting attributes in the current selection in this CRichEditCtrl object. |
|
Sets the target output device for this CRichEditCtrl object. |
|
Sets the text mode or undo level of a rich edit control. The message fails if the control contains text. |
|
Sets the maximum number of actions that can stored in the undo queue. |
|
Sets the character formatting attributes in the current word in this CRichEditCtrl object. |
|
Sets the word-wrapping and word-breaking options for the rich edit control. This message is available only in Asian-language versions of the operating system. |
|
Stops the control from collecting additional typing actions into the current undo action. The control stores the next typing action, if any, into a new action in the undo queue. |
|
Inserts text from an input stream into this CRichEditCtrl object. |
|
Stores text from this CRichEditCtrl object into an output stream. |
|
Reverses the last editing operation. |
Remarks
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.
This Windows Common control (and therefore the CRichEditCtrl class) is available only to programs running under Windows 95/98 and Windows NT versions 3.51 and later. The CRichEditCtrl class supports versions 2.0 and 3.0 of the Windows SDK rich edit control.
Warning
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:
Knowledge Base article Q259949 : INFO: SetCaretPos() Is Not Appropriate with CEdit or CRichEditCtrl Controls
For an example of using a rich edit control in an MFC application, see the WORDPAD sample application.
Inheritance Hierarchy
CRichEditCtrl
Requirements
Header: afxcmn.h