C++模板会使代码膨胀吗(七)

2014-11-24 09:13:57 · 作者: · 浏览: 5
p
{
public:
CWndProcThunk m_thunk;
const _ATL_MSG* m_pCurrentMsg;
DWORD m_dwState;

enum { WINSTATE_DESTROYED = 0x00000001 };

// Constructor/destructor
CWindowImplRoot() : m_pCurrentMsg(NULL), m_dwState(0)
{ }

virtual ~CWindowImplRoot()
{
#ifdef _DEBUG
if(m_hWnd != NULL) // should be cleared in WindowProc
{
ATLTRACE(atlTraceWindowing, 0, _T("ERROR - Object deleted before window was destroyed\n"));
ATLASSERT(FALSE);
}
#endif //_DEBUG
}

// Current message
const _ATL_MSG* GetCurrentMessage() const
{
return m_pCurrentMsg;
}

// "handled" management for cracked handlers
BOOL IsMsgHandled() const
{
const _ATL_MSG* pMsg = GetCurrentMessage();
ATLASSERT(pMsg != NULL);
ATLASSERT(pMsg->cbSize >= sizeof(_ATL_MSG));
return pMsg->bHandled;
}
void SetMsgHandled(BOOL bHandled)
{
_ATL_MSG* pMsg = (_ATL_MSG*)GetCurrentMessage(); // override const
ATLASSERT(pMsg != NULL);
ATLASSERT(pMsg->cbSize >= sizeof(_ATL_MSG));
pMsg->bHandled = bHandled;
}

// Message forwarding and reflection support
LRESULT ForwardNotifications(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT ReflectNotifications(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
static BOOL DefaultReflectionHandler(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lResult);
};

0:000> x HYTeris!ATL::CWindowImplRoot*
004364d0 HYTeris!ATL::CWindowImplRoot >::~CWindowImplRoot > (void)
004367d0 HYTeris!ATL::CWindowImplRoot >::~CWindowImplRoot > (void)
00457c30 HYTeris!ATL::CWindowImplRoot >::CWindowImplRoot > (void)
00460550 HYTeris!ATL::CWindowImplRoot >::CWindowImplRoot > (void)
004479d0 HYTeris!ATL::CWindowImplRoot >::CWindowImplRoot > (void)
0041c360 HYTeris!ATL::CWindowImplRoot::~CWindowImplRoot (void)
00435f40 HYTeris!ATL::CWindowImplRoot >::~CWindowImplRoot > (void)
004613f0 HYTeris!ATL::CWindowImplRoot::ForwardNotifications (unsigned int, unsigned int, long, int *)
00438f50 HYTeris!ATL::CWindowImplRoot::ReflectNotifications (unsigned int, unsigned int, long, int *)
0041c8e0 HYTeris!ATL::CWindowImplRoot::CWindowImplRoot (void)
004e2800 HYTeris!ATL::CWindowImplRoot > `RTTI Type Descriptor' =
004d897c HYTeris!ATL::CWindowImplRoot >::`RTTI Base Class Array' =
004d896c HYTeris!ATL::CWindowImplRoot >::`RTTI Class Hierarchy Descriptor' =
004d9640 HYTeris!ATL::CWindowImplRoot >::`RTTI Class Hierarchy Descriptor' =
004d9650 HYTeris!ATL::CWindowImplRoot >::`RTTI Base Class Array' =
004d8950 HYTeris!ATL::CWindowImplRoot >::`RTTI Base Class Descriptor at (0,-1,0,64)' =
004d9028 HYTeris!ATL::CWindowImplRoot >::`RTTI Class Hierarchy Descriptor' =
004d9038 HYTeris!ATL::CWindowImplRoot >::`RTTI Base Class Array' =
004e16dc HYTeris!ATL::CWindowImplRoot `RTTI Type Descriptor' =
004e3530 HYTeris!ATL::CWindowImplRoot > `RTTI Type Descriptor' =
004d9624 HYTeris!ATL::CWindowImplRoot >::`RTTI Base Class Descriptor at (0,-1,0,64)' =
004d79c8 HYTeris!ATL::CWindowImplRoot::`RTTI Base Class Descriptor at (0,-1,0,64)' =
004e2f58 HYTeris!ATL::CWindowImplRoot > `RTTI Type Descriptor' =
004d79f4 HYTeris!ATL::CWindowImplRoot::`RTTI Base Class Array' =
004d79e4 HYTeris!ATL::CWindowImplRoot::`RTTI Class Hierarchy Descriptor' =
0