实现代码: int nLenth = pEdit->GetWindowTextLength(); pEdit->SetSel(nLenth, nLenth, FALSE); pEdit->SetFocus();