Replaces the selected text in an edit control or a rich edit control with the specified text.
Parameters
-
wParam
-
Specifies whether the replacement operation can be undone. If this is TRUE, the operation can be undone. If this isFALSE , the operation cannot be undone.
lParam
-
A pointer to a null-terminated string containing the replacement text.
Return value
This message does not return a value.
Remarks
Use the EM_REPLACESEL message to replace only a portion of the text in an edit control. To replace all of the text, use the WM_SETTEXT message.
If there is no selection, the replacement text is inserted at the caret.
Rich Edit: Supported in Microsoft Rich Edit 1.0 and later. For information about the compatibility of rich edit versions with the various system versions, see About Rich Edit Controls.
In a rich edit control, the replacement text takes the formatting of the character at the caret or, if there is a selection, of the first character in the selection.
Requirements
| Minimum supported client | Windows 2000 Professional [desktop apps only] |
|---|---|
| Minimum supported server | Windows 2000 Server [desktop apps only] |
| Header |
|
本文介绍了一个用于替换编辑控件或富文本编辑控件中选定文本的消息,详细解释了参数的作用,包括是否允许撤销操作及替换文本,并说明了在没有选中文本时的行为以及在不同系统版本中的兼容性。
528

被折叠的 条评论
为什么被折叠?



