mfc:写了一个读取编辑框中内容并储存为txt的代码,但是只能输入数字和字母,求大神帮忙看一下

void receive2::OnBnClickedButton2()
{

    CString strText(_T(""));
    GetDlgItemText(IDC_EDIT2, strText); //获取edit box中的数据

    try
    {
        CStdioFile file;
        file.Open(_T("D:\\abc.txt"), CFile::modeCreate | CFile::modeWrite | CFile::typeText);
        //打开D盘的txt文件
        file.WriteString(strText);  //写入edit box中的数据
        file.Close();
    }
    catch (CFileException* e)
    {
        e->ReportError();
        e->Delete();
}

}

你的意思是中文不行?
参考这个:http://blog.csdn.net/mowwwcom/article/details/39555927

编辑框里是文字的时候,文件就是空的了