In MFC dialog mode, EDIT sets the cursor position

CString strTemp;

GetDlgItemText(IDC_EDT1,strTemp);

int dwLen=strTemp.GetLength();

((CEdit*)GetDlgItem(IDC_EDT1))->SetSel(dwLen,dwLen,TRUE);

Guess you like

Origin blog.csdn.net/Hat_man_/article/details/110438555