Rich edit controls support most, but not all, of the functionality of multiline edit controls. Table 5-2 lists the messages that are supported by rich edit controls. But you should also take special note of the following messages, which are processed by multiline edit controls but not by rich edit controls:
EM_FMTLINES
EM_GETHANDLE (Rich edit controls do not store text as a simple array of characters.)
EM_GETMARGINS
EM_GETPASSWORDCHAR (Rich edit controls do not support the ES_PASSWORD style.)
EM_SETHANDLE (Rich edit controls do not store text as a simple array of characters.)
EM_SETMARGINS
EM_SETPASSWORDCHAR (Rich edit controls do not support the ES_PASSWORD style.)
EM_SETRECTNP
EM_SETTABSTOPS (Rich edit controls use the EM_SETPARAFORMAT message instead.)
WM_CTLCOLOR (Rich edit controls use the EM_SETBKGNDCOLOR message instead.)
WM_GETFONT (Rich edit controls use the EM_GETCHARFORMAT message instead.)
Message | Description |
EM_CANPASTE | Determines whether a rich edit control can paste a given clipboard format. |
EM_CHARFROMPOS | Retrieves the zero-based character index and the zero- based line index of the character nearest the specified point in a rich edit control. |
Table 5-2. Rich edit control messages. (continued)
Message | Description |
EM_DISPLAYBAND | Displays part of a rich edit control's contents as pre-viously formatted for a device (by using the EM_FORMATRANGE message). |
EM_EXGETSEL | Retrieves the positions of the starting and ending characters in a selection. |
EM_EXLIMITTEXT | Sets an upper limit (in characters) on the amount of text that can be contained in a rich edit control. |
EM_EXLINEFROMCHAR | Determines which line contains a specified character. |
EM_EXSETSEL | Selects a range of characters. |
EM_FINDTEXT | Finds text within a rich edit control. |
EM_FINDTEXTEX | Finds text within a rich edit control by using the FINDTEXTEX structure. |
EM_FINDWORDBREAK | Finds the next word break before or after the specified character position, or retrieves information about the character at that position. |
EM_FORMATRANGE | Formats a range of text for a specific device. |
EM_GETCHARFORMAT | Determines the current character formatting. |
EM_GETEVENTMASK | Retrieves the event mask for a rich edit control. The event mask specifies which notifications the control sends to its parent window. |
EM_GETLIMITTEXT | Retrieves the current upper limit (in characters) on the amount of text that can be contained in a rich edit control. |
EM_GETOLEINTERFACE | Retrieves an IRichEditOle object that a client can use to access a rich edit control's OLE functionality. |
EM_GETOPTIONS | Retrieves the current options (styles) of a rich edit control (read-only, vertical scroll bar, and so on). |
EM_GETPARAFORMAT | Retrieves the paragraph formatting of the current selection. |
EM_GETSELTEXT | Retrieves the currently selected text. |
EM_GETTEXTRANGE | Retrieves a specified range of characters. |
EM_HIDESELECTION | Hides or shows the current selection. |
EM_PASTESPECIAL | Pastes a specific clipboard format in the control. |
EM_POSFROMCHAR | Retrieves the coordinates of the specified character in a rich edit control. |
EM_REQUESTRESIZE | Forces the control to send an EN_REQUESTRESIZE notification to its parent window. |
EM_SCROLLCARET | Scrolls the caret into view in a rich edit control. |
EM_SELECTIONTYPE | Determines the selection type. (See the Win32 SDK documentation for the selection types that can be returned.) |
EM_SETBKGNDCOLOR | Sets the background color. |
EM_SETCHARFORMAT | Sets character formatting. |
EM_SETEVENTMASK | Sets the event mask, which specifies the notifications the control sends to its parent window. |
EM_SETOLECALLBACK | Gives a rich edit control an IRichEditOleCallback object that the control uses to get OLE-related resources and information from the client. |
EM_SETOPTIONS | Sets the options (styles) for a rich edit control (read-only, vertical scroll bar, and so on). |
EM_SETPARAFORMAT | Sets the paragraph formatting for the current selection. |
EM_SETTARGETDEVICE | Sets the target device and line width used for WYSIWYG formatting. |
EM_STREAMIN | Replaces the contents of the control with the specified data stream. |
EM_STREAMOUT | Writes the contents of the control to the specified data stream. |