void ReplaceSel( const char FAR* lpNewText );
lpNewText
Points to a null-terminated string containing the replacement text.
Replaces the current selection in an edit control with the text specified by lpNewText.
Replaces only a portion of the text in an edit control. If you want to replace all of the text, use the CWnd::SetWindowText member function.
If there is no current selection, the replacement text is inserted at the current cursor location.
CWnd::SetWindowText, EM_REPLACESEL