用于得到窗口中的数据
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
if(judge==true)
{
CString x;
// TODO: Add your control notification handler code here
CFile mFile("data.in",CFile::modeWrite|CFile::modeCreate);//打开文件仅仅用于读写
UpdateData(1);//更新数据
GetDlgItem(IDC_EDIT1)->GetWindowText(x);
CArchive ar(&mFile,CArchive::store);
ar.WriteString(x);
UpdateData(FALSE);
ar.Close();
mFile.Close();
}
时间: 2024-12-05 23:33:22