📄 abwinexception.cpp
字号:
// AbWinException.cpp: implementation of the CAbWinException class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "mixer.h"
#include "AbWinException.h"
#include <sstream>
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CAbWinException::CAbWinException(unsigned u,const char *f,unsigned l,
const WNDCLASSEX&wndclass,bool bSystem)
:m_strDetails(GetDetailedMessage(wndclass)),CAbException(u,f,l,bSystem)
{
#ifdef _DEBUG
::OutputDebugString(m_strDetails.c_str());
#endif
}
CAbWinException::~CAbWinException()
{
}
string CAbWinException::GetMessage() const
{
string strMsg=CAbException::GetMessage();
strMsg+="\n";
strMsg+=m_strDetails;
return strMsg;
}
string CAbWinException::GetDetailedMessage(const WNDCLASSEX &w)
{
stringstream stm;
stm <<"WindowClass: cbSize="<<w.cbSize<<" style="<<w.style;
stm <<" WndProc="<<(void*)w.lpfnWndProc;
stm <<" ClsExtra="<<w.cbClsExtra<<" WndExtra="<<w.cbWndExtra;
stm <<" hInstance="<<(void*)w.hInstance;
stm <<" hIcon="<<(void*)w.hIcon<<" hCursor="<<(void*)w.hCursor<<" hbrBg="<<(void*)w.hbrBackground;
stm <<" MenuName="<<(void*)w.lpszMenuName;
stm <<" ClassName="<<w.lpszClassName<<" hIconSm="<<(void*)w.hIconSm<<ends;
return stm.str();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -