|
-
July 18th, 2008, 04:32 AM
#1
Window Redraw Issue
I have an application that pops up a modal dialog box during a long calculation. This dialog box is supposed to show the progress during the calculation. this works fine so long as the user does not drag another window over the window, however if they do then the window redraws do not seem to work (or if another window covers this window then is minimized it does not seem to redraw the window either!)
Below is a snippet of the code i am using
CCalcualtionDialog: oCalculation()
{
for(i=0;i<quadrangearray.GetSize();i=i+2)
{
// Do Calcuation
// Attempt to update window
progressdlg.m_progresstext.Format("Done Iteration %d, i);
progressdlg.m_progresstext3 = "";
progressdlg.UpdateData(FALSE);
progressdlg.UpdateWindow();
progressdlg.ShowWindow(SW_SHOW);
}
}
If anyone knows how to force the update so it works correctly can you help me
-
July 18th, 2008, 04:40 AM
#2
Re: Window Redraw Issue
Is the progress dialog shown from same thread ? If yes, you should to show the progress from separate thread and send messages to that thread about the progress, a single threaded aproach would block the window proc of current window.
Regards,
Ramkrishna Pawar
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|