DWORD dwSel = ((CEdit*)GetDlgItem(IDC_EDIT1))->GetSel();
((CEdit*)GetDlgItem(IDC_EDIT1))->SetSel(dwSel, dwSel);
((CEdit*)GetDlgItem(IDC_EDIT1))->ReplaceSel(pWchar);
((CEdit*)GetDlgItem(IDC_EDIT1))->ReplaceSel(_T("\r\n"));
转载于:https://www.cnblogs.com/jianqiang2010/archive/2010/08/23/1806510.html