Good points. Thanks Joe.
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
The problem with disabling the entire window is you can't drag it, you
can't minimize it,
you can't exit the program, and you can't even tell the thread to stop if
you think it is
taking too long. I prefer to disable controls, menu items, etc. that
would cause
problems, and leave as much as possible enabled.
joe
On Fri, 21 Sep 2007 15:01:35 -0700, "Mark Salsbery [MVP]"
<MarkSalsbery[MVP]@newsgroup.nospam> wrote:
You could do what MFC does to simulate a modal dialog.
Disable the app's main window for the duration of the operation.
Perform the lengthy operation on another thread.
Process your app-specific message as usual.
Enable the main window when it's OK for the user to use the UI.
Mark
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm