In VB, it helped to put the word DoEvents somewhere in the body of a loop so the program would respond to a user while the loop was running...
For instance (VB Code samples):
The first loop above would not respond to a user clicking a button or minimizing the form until the loop was finished, appearing as if the application was frozen. Also, it can take away from interaction with other apps because it usually takes 99% of your CPU time...Dim lCount As Long
Example 1:
Do While lCount < 10000000
lCount = lCount + 1
Loop
Example 2:
Do While lCount < 10000000
lCount = lCount + 1
DoEvents
Loop
The second allows interactivity while the loop is counting (so the form can be minimized, etc.). It basically allows users to still do stuff in Windows while the loop counts mindlessly away in the background.
Is there anything similar in C++ to avoid these "frozen" type symptoms?