An application sends an EM_REPLACESEL message to replace the current selection in an edit control with the specified text.
EM_REPLACESEL
fCanUndo = (BOOL) wParam ; // flag that specifies whether replacement can be undone
lpszReplace = (LPCTSTR) lParam ; // pointer to replacement text string
This message does not return a value.
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 current selection, the replacement text is inserted at the current location of the caret.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in winuser.h.
Edit Controls Overview, Edit Control Messages, WM_SETTEXT