try
{
检测的代码
}
catch(CException* e)
{
TCHAR szCause[255];
CString strFormatted;
e->GetErrorMessage(szCause, 255);
strFormatted = _T("The data file could not be opened because of this error: ");
strFormatted += szCause;
AfxMessageBox(strFormatted);
}
{
检测的代码
}
catch(CException* e)
{
TCHAR szCause[255];
CString strFormatted;
e->GetErrorMessage(szCause, 255);
strFormatted = _T("The data file could not be opened because of this error: ");
strFormatted += szCause;
AfxMessageBox(strFormatted);
}