vv_ram...@yahoo.com wrote:
Thanks for your valuable help. I am done with (1).
Regarding (2), I have a member function which tells whether the
operation is in progress.
I want the the main window to open a dialog (not a modeless) and run a
progress bar
(going from 0 to 100 to 0. I.e. Start to End to Start) until the
operation is complete.
So, I created a dialog with just a CProgressCtrl in it and when the
main window calls DoModal(),
it opens the dialog but will never exit from this function!! How to
get rid of this problem.
Thanks and appreciate your help.
- Newbie
Looks like, I have to go with "Modeless" dialog. So, be it.
But when this dialog is in the front and when I click the main
window,
the main windows title goes to XX...(Not Responding) and the progress
window also
doesn't show the progress (it looks hung)
How can we get around this problem?
Tried GetDesktopWindow() as the main window to no avail.
CModeless *pML = new CModeless(this);
pML->Create(pML::IDD, GetDesktopWindow());
pML->ShowWindow(SW_SHOW);
pML->SetForegroundWindow();
Thanks in advance.
- Newbie
You can use either modal or modeless dialog to display the progress. A
modal dialog is often used if you also want to implement a Cancel button
to halt the long operation. You can kill a modal dialog by calling its
EndDialog (or OnOK, or OnCancel). You kill a modeless dialog by calling
its DestroyWindow.
If the main window is "not responding" you are doing something wrong.
Probably executing an infinite loop in your code. Don't do that. If
you don't know what it's doing hit the Break command on the Debug menu
and find out where it is executing.
--
Scott McPhillips [MVP VC++]
respond".
I.e. It goes to "not respond" only when I click on the main window!!
I.e. I want to show the main window in the back of this progress
dialog!! but not do anything.
Thanks in advance.