ReplaceSel
Replaces the current selection in this Edit control with specified text.
void ReplaceSel( LPCTSTR lpcszNewText, BOOL bCanUndo = FALSE )
void
EX1
#include <..\OriginLab\DialogEx.h> #define IDC_EDIT1 1001 void Edit_ReplaceSel(Dialog& MyDlg) { Edit ed = MyDlg.GetItem(IDC_EDIT1); ed.SetSel(32000, 32000); // move to end of all text string str = "Sample"; ed.ReplaceSel(str); }
Edit::SetSel
Control.h