I have this code in VC6 MFC:
Code:
BOOL CSimEngineApp::PumpMessage()
{
ASSERT_VALID(this);
//if (!::PeekMessage(&m_msgCur, NULL, NULL, NULL, PM_REMOVE))
if (!::PeekMessage(&m_lastSentMsg, NULL, NULL, NULL, PM_REMOVE))
{
return TRUE;
}
if (m_msgCur.message == WM_QUIT)
{
#ifdef _DEBUG
if (afxTraceFlags & traceAppMsg)
TRACE0("CWinThread::PumpMessage - Received WM_QUIT.\n");
m_nDisablePumpCount++; // application must die
// Note: prevents calling message loop things in 'ExitInstance'
// will never be decremented
#endif
return FALSE;
}
#ifdef _DEBUG
if (m_nDisablePumpCount != 0)
{
TRACE0("Error: CWinThread::PumpMessage called when not permitted.\n");
ASSERT(FALSE);
}
#endif
// process this message
if (m_msgCur.message != WM_KICKIDLE && !PreTranslateMessage(&m_msgCur))
{
::TranslateMessage(&m_msgCur);
::DispatchMessage(&m_msgCur);
}
return TRUE;
}
I am trying to use this code in 2005, but it shouts that m_msgCur and m_nDisablePumpCount are not declared. Did anyone solve this?