GetDlgItem得到CWnd*类型强制转换为CEdit*然后再去掉SetWindowText举例((CEdit *)GetDlgItem(IDC_EDIT1))->SetWindowText(_T("测试文字"));