thanks,
Ji
Hi Ms JiChen.
Did you tried Message Pumping
Read this concerned article on code project.
http://www.codeproject.com/threads/TemplatedLengthyOperation.asp
In conclusion, you can solve by calling below function.
BOOL XXX::Pump()
{
MSG msg;
while (::PeekMessage(&msg, NULL, // pump message until none
NULL, NULL, PM_NOREMOVE)) // are left in the queue
{
AfxGetThread()->PumpMessage();
}
return m_bAbort;
}
Good Luck~
Yesterday, I tried adding a timer procedure for message pumping.
I think there are many different ways. ^^;;
A-ha..I forgot this issue..
Thanks.
Using PeekMessage is more appropriate.
There are many ways to do what you need to do and this has been discussed very frequently in other forums. You must read the relevant Microsoft documentation too; see Idle Loop Processing. It has a sample message loop override and it is best to use the official sample.
Note however that OnIdle is not processed for dialogs, or at least it was not in previous versions of MFC. I have a sample in my site for dialogs in case that helps.