
modal dialog spawning a modal dialog
Quote:
>I have a dialog based app, and when the first screen comes up, I want it
>to automatically show another modal dialog box, a setup screen. I can't
>put this in the InitDialog of the first dialog otherwise it doesn't show
>the first dialog before the setup screen.
>Where abouts do I put DoModal for the setup screen, so that the main app
>window comes up, then the setup screen immediately after it?
It sounds like what you want to do is display the first dialog,
wait a certain amount of time (say, a second) to give the user a chance to
see it, then display the second dialog on top of the first. Is that
correct? If so, there are two ways to go about it:
*In your OnInitDialog for the first dialog, call UpdateWindow() to
make sure that the dialog has been drawn. Then, call Sleep(1000) to wait for
a second, then go ahead and DoModal() the setup dialog. This may or may not
work, depending on the specifics of your application.
*In your OnInitDialog for the first dialog, call SetTimer to set a timer
for 1000 milliseconds later. Then add an OnTimer handler to your dialog;
that handler should kill the timer, then DoModal() the setup dialog. This
should always work, at the expense of slightly more complex code.
--
\o\ If you're interested in books and stories with transformation themes, \o\
/o/ please have a look at <URL: http://www.*-*-*.com/ ;. Thanks! /o/
\o\ FC1.21:FC(W/C)p6arw A- C->++ D>++ H+ M>+ P R T++++ W** Z+ Sm RLCT \o\
/o/ a cmn++++$ d e++ f+++ h- i++wf p-- sm# /o/