Property page trouble
-
hi, I perform a lengthy operation in a property page when users clicks a button. For example, like this ////////////// m_bUserAbort = FALSE; while(1) { MSG msg; while (::PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) AfxGetThread()->PumpMessage(); if(m_bUserAbort) break; } /////////// However, the dialog is not responding to user's cancel button click, which sets m_bUserAbort to true. what is wrong ? the page is not even responding to move operation by mouse. regards hari Hari Krishnan
-
hi, I perform a lengthy operation in a property page when users clicks a button. For example, like this ////////////// m_bUserAbort = FALSE; while(1) { MSG msg; while (::PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) AfxGetThread()->PumpMessage(); if(m_bUserAbort) break; } /////////// However, the dialog is not responding to user's cancel button click, which sets m_bUserAbort to true. what is wrong ? the page is not even responding to move operation by mouse. regards hari Hari Krishnan
Hi Hari, Try:
while(1) { MSG msg; while(::PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) { if(!**AfxGetApp()**->PumpMessage()) { ::PostQuitMessage(0); break; } } **// Simulate the framework's idle processing mechanism. LONG lIdle = 0; while (AfxGetApp ()->OnIdle (lIdle++));** if(m_bUserAbort) break; }
Wout Louwers -
Hi Hari, Try:
while(1) { MSG msg; while(::PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) { if(!**AfxGetApp()**->PumpMessage()) { ::PostQuitMessage(0); break; } } **// Simulate the framework's idle processing mechanism. LONG lIdle = 0; while (AfxGetApp ()->OnIdle (lIdle++));** if(m_bUserAbort) break; }
Wout Louwersthanks Hari Krishnan