在一个edit box中输入 "abcdefg",并保存,得到的txt中正确显示"abcdefg"再将edit box 中的"abcdefg" 改成"abcde"保存以后打开txt仍然是"abcdefg"   (为什么?)但是,将edit box 中的"abcdefg" 改成"abcde+空格+空格",txt文档就会变成"abcde+空格+空格"也就是说edit box 修改后的内容长度一定要比原来的txt内容的长度要长?如何将txt中的内容保存为何edit box中一样的?
void CLexicalDlg::save() 
{
// TODO: Add your control notification handler code here
CString str1;
GetDlgItem(IDC_EDIT1)->GetWindowText(str1);


CFile m_File(_T("E:\\abcd.txt"),CFile::modeWrite);
m_File.Write(str1,str1.GetLength());
m_File.Flush();
m_File.Close();
AfxMessageBox( "保存完成 ");