Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preemptive execution

Status
Not open for further replies.

redoctober

Programmer
Oct 25, 2000
37
CA
Hi,
I'm writing a little program which does the following:
When i press the button it goes in my Doc class and performs some tasks which sometimes may take a few minutes. What i want to achieve is to be able to report the status of execution in the window. Every once in a while i'm sending a message (throught Invalidate() procedure) to redraw the screen, but since my code is running none of the messages is being handled until my routine finishes. I'm looking for a way to force message handling system to kick in when i need it. I know Delphi has function which preempts execution of the code for few milliseconds to let some messages to got through and i hope MFC has something like that too.
Thanks in advance.
 
try what take too much time in a separate thread. Use CreateThread Ion Filipski
1c.bmp


filipski@excite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top