Thanks!!
Richard
You need a modeless dialog box, not a modal dialog box, so you'll
have to write a modeless version of MessageBox().
HWND hwnd_message=CreateDialog(...)
...continue...
DestroyWindow(hwnd_message);
--
John A. Grant * I speak only for myself * jag...@nrcan.gc.ca
Airborne Geophysics, Geological Survey of Canada, Ottawa
If you followup, please do NOT e-mail me a copy: I will read it here.
That works great but how then do I disable the application's user
interface while the modeless dialog box is displayed?
Richard
The short answer is: use EnableWindow(FALSE) on the frame.
Ken
Richard Bell <rb...@tiac.net> wrote in article
<32dbd9db....@transfer.stratus.com>...
> I'm new to Win NT programming and can not find a simple
way to display
> a modal message, continue execution, and then remove the
message. Can
> anyone give me some direction?
Run another thread, open a modal dialog there and if you'll
not need
this dialog/thread anymore, just kill this thread.
--
Alexander Prochorov,
Datlin Software, Ltd.
This will be tricky to do, unfortunately, since the new thread
will need its own message loop. Multiple UI threads are generally
considered a bad idea in the Windows world.
Ken
>Thanks John!
>
>That works great but how then do I disable the application's user
>interface while the modeless dialog box is displayed?
Simply EnableWindow(hwnd,FALSE)
There is nothing wrong with multiple UI threads. (IE3 and
Explorer have multiple UI threads.) Yes, it's tricky, but
multithreading in general is tricky.
--
(My return address is intentionally invalid to foil spammers. Delete the
".---" to get my real address. I do this on my own time with my own money;
my responses are not to be considered official technical support or advice.)
One thing that can help is to do your application internally as client/server.
The server portion has no user interface, and implements the "guts" of the
application. The user interface is implemented by one or more clients,
each of which has its own thread (the server has a thread, too (or maybe
more than one, depending on what it does)).
The number of UI threads you end up with depends on how many clients it
is sensible for your application to have running at once.
The nice thing about this approach is that it separates interface from
core functionality, leading to a cleaner design and implementation of both.
--Tim Smith