诡异的MFC问题!高手进来看看!
我写的一个对话框程序,上面放置了一些空间,如edit, static , treectrl, button等。
然后我在启动此程序的时候,没有做任何动作。我的代码都没有运行的情况下。运行开始后几秒钟后(此时我没有做任何事情),弹出地址非法访问,然后我中断查看调用堆栈,发现框架代码中的:
BOOL AFXAPI AfxInternalPumpMessage()
{
_AFX_THREAD_STATE *pState = AfxGetThreadState();
if (!::GetMessage(&(pState->m_msgCur), NULL, NULL, NULL))
{
#ifdef _DEBUG
TRACE(traceAppMsg, 1, "CWinThread::PumpMessage - Received WM_QUIT.\n");
pState->m_nDisablePumpCount++; // application must die
#endif
// Note: prevents calling message loop things in 'ExitInstance'
// will never be decremented
return FALSE;
}
此时的m_msgCur的消息值0x118 查找后,发现是wm_systimer 这个消息导致的。。。
确实不知道是哪里出了问题。太诡异了。。
大家帮我分析哈!谢谢!