Run-Time Check Failure #2 - Stack around the variable 'InitCtrls' was corrupted.
在添加这个函数后,点关闭软件就会弹出提示Run-Time Check Failure #2 - Stack around the variable 'InitCtrls' was corrupted.
也不知道哪里越界了
void progress::OnBnClickedOk()
{
// TODO: 在此添加控件通知处理程序代码
CStdioFile myFile;
CFileException fileException;
if (myFile.Open(_T("D:\\新建文件夹 (5)\\MFCApplication11\\MFCApplication11\\progress.txt"), CFile::typeText | CFile::modeReadWrite), &fileException)
{
myFile.SeekToBegin();
CString vx;
while (myFile.ReadString(vx))
{
m_edith.SetSel(-1);//编辑框定位到末尾
vx.Format(L"%s\r\n", vx);
m_edith.ReplaceSel(vx);
}
}
else
TRACE("Can't open file %s,error=%u\n", _T("D:\\新建文件夹 (5)\\MFCApplication11\\MFCApplication11\\progress.txt"), fileException.m_cause);
myFile.Close();
}