📄 stdafx.cpp
字号:
// stdafx.cpp : source file that includes just the standard includes
// SM.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
//公用变量
CDaoDatabase theDatabase;//公用工作空间
//异常信息处理用缓冲区
static TCHAR ErrorBuf[256];
//通用异常信息处理
void DisplayException(CException* e)
{
e->GetErrorMessage(ErrorBuf, 255);
AfxMessageBox(ErrorBuf);
e->Delete();
}
//DAO异常信息处理
void DisplayDaoException(CDaoException* e)
{
CString strMsg;
if (e->m_pErrorInfo!=NULL)
{
strMsg.Format(
_T("%s (%d)\n\n")
_T("Would you like to see help?"),
(LPCTSTR)e->m_pErrorInfo->m_strDescription,
e->m_pErrorInfo->m_lErrorCode);
if (AfxMessageBox(strMsg, MB_YESNO) == IDYES)
{
WinHelp(GetDesktopWindow(),
e->m_pErrorInfo->m_strHelpFile,
HELP_CONTEXT,
e->m_pErrorInfo->m_lHelpContext);
}
}
else
{
strMsg.Format(
_T("ERROR:CDaoException\n\n")
_T("SCODE_CODE =%d\n")
_T("SCODE_FACILITY =%d\n")
_T("SCODE_SEVERITY =%d\n")
_T("ResultFromScode =%d\n"),
SCODE_CODE (e->m_scode),
SCODE_FACILITY (e->m_scode),
SCODE_SEVERITY (e->m_scode),
ResultFromScode (e->m_scode));
AfxMessageBox(strMsg);
}
e->Delete();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -