// If we're the current routing frame, pop the routing frame stack
_AFX_THREAD_STATE* pThreadState = AfxGetThreadState();
while (pThreadState->m_pRoutingFrame == this)
pThreadState->m_pPushRoutingFrame->Pop();
if (m_phWndDisable != NULL)
delete[] (void*)m_phWndDisable;
CWnd::~CWnd()
{
if (m_hWnd != NULL &&
this != (CWnd*)&wndTop && this != (CWnd*)&wndBottom &&
this != (CWnd*)&wndTopMost && this != (CWnd*)&wndNoTopMost)
{
TRACE(traceAppMsg, 0, _T("Warning: calling DestroyWindow in CWnd::~CWnd; ")
_T("OnDestroy or PostNcDestroy in derived class will not be called.\n"));
DestroyWindow();
}
这是CWnd类的析构函数的伪代码
public:
virtual ~CWnd();
这是他的声明。