void CDlgDlg::OnButton7() { CWnd * pEdit = GetDlgItem(IDC_EDIT1); if( NULL != pEdit) { CString str ; pEdit->GetWindowText(str); CFile file ; file.Open("d:\\1.txt",CFile::modeCreate|CFile::modeNoInherit|CFile::modeWrite); file.SeekToEnd(); file.Write((LPCTSTR)str,str.GetLength()); file.Close(); } }
|