BCGSoft Professional Editor for MFC
void CBCGPEditCtrl::ReplaceSel ( LPCTSTR  lpszNewText,
BOOL  bCanUndo = FALSE 
)

Replaces the current selection with the specified text.

Call this function to replace the current selection in this CBCGPEditCtrl object with the specified text.

If there is no current selection, the replacement text is inserted at the insertion point, that is, the current caret location.

Parameters
lpszNewTextpointer to a null-terminated string containing the replacement text.
bCanUndothis parameter is reserved for future versions. Please call ReplaceSel with TRUE for the second parameter.