Guest User

Untitled

a guest
Apr 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. BOOL AFXAPI AfxInternalPumpMessage()
  2. {
  3. _AFX_THREAD_STATE *pState = AfxGetThreadState();
  4.  
  5. if (!::GetMessage(&(pState->m_msgCur), NULL, NULL, NULL)) <-----
  6. {
  7. #ifdef _DEBUG
  8. TRACE(traceAppMsg, 1, "CWinThread::PumpMessage - Received WM_QUIT.n");
  9. pState->m_nDisablePumpCount++; // application must die
  10. #endif
  11. // Note: prevents calling message loop things in 'ExitInstance'
  12. // will never be decremented
  13. return FALSE;
  14. }
  15.  
  16. if (pThreadInfo->m_pActivity)
  17. {
  18. SetThreadPriority(pThreadInfo->m_hThread, THREAD_PRIORITY_NORMAL);
  19. pThreadInfo->m_pActivity->Execute();
  20. SetThreadPriority(pThreadInfo->m_hThread, THREAD_PRIORITY_BELOW_NORMAL);
  21. pThreadInfo->m_pActivity = NULL;
  22. }
  23. else
  24. Sleep(50); <-----
Add Comment
Please, Sign In to add comment