GetDlgItem(ID_EDIT)->EnableWindow(FALSE);//只读。
GetDlgItem(ID_EDIT)->EnableWindow(TRUE);//取消只读。
((CEdit *)GetDlgItem(IDC_EDIT1))->SetReadOnly(TRUE);