Question on Dialog based app startup 
Author Message
 Question on Dialog based app startup

Hi,

I have dialog based app that fills a list control with data on startup. I'd
like the app window to display before the process of filling the list box
begins. Currently, I start the process in oninitdialog which causes the
process to complete before the app window is displayed. Where should I kick
off my list control code so it does not start until the app window is
displayed?

Thanks for the help.

Tom



Wed, 13 Aug 2003 02:16:18 GMT  
 Question on Dialog based app startup
In a dialog based application, the dialog is the app window.
So what you would need is a SplashWindow.  They way I have done this before
is to create a modal dialog box and display it at the begining of
InitInstance. And have my main dialog destroy the splash screen once it is
done with the OnInitDialog.
Unless you want your dialog box to be displayed before it is filled, which
in that case you can leave your OnInitDialog empty and setup a timer (100
ms) before you return from OnInitDialog and when the timer hits then call
your fill routine.

Ali


Quote:
> Hi,

> I have dialog based app that fills a list control with data on startup.
I'd
> like the app window to display before the process of filling the list box
> begins. Currently, I start the process in oninitdialog which causes the
> process to complete before the app window is displayed. Where should I
kick
> off my list control code so it does not start until the app window is
> displayed?

> Thanks for the help.

> Tom



Wed, 13 Aug 2003 03:27:08 GMT  
 Question on Dialog based app startup
In your OnInitDialog(), run a PostMessage window to yourself, with a custom
message id.  In your message handler, fill your listbox.


Quote:
> Hi,

> I have dialog based app that fills a list control with data on startup.
I'd
> like the app window to display before the process of filling the list box
> begins. Currently, I start the process in oninitdialog which causes the
> process to complete before the app window is displayed. Where should I
kick
> off my list control code so it does not start until the app window is
> displayed?

> Thanks for the help.

> Tom



Wed, 13 Aug 2003 05:24:24 GMT  
 Question on Dialog based app startup
Overriding OnWindowPosChanged might work. See my notes at:

http://www.cpp.atfreeweb.com/DlgPosChanged.html


Quote:
> Hi,

> I have dialog based app that fills a list control with data on startup.
I'd
> like the app window to display before the process of filling the list box
> begins. Currently, I start the process in oninitdialog which causes the
> process to complete before the app window is displayed. Where should I
kick
> off my list control code so it does not start until the app window is
> displayed?

> Thanks for the help.

> Tom



Wed, 13 Aug 2003 07:49:17 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Hide dialog based app on startup

2. Again: minimizing dialog-based app on startup....

3. Hiding a dialog based app on startup

4. Dialog based app minimize on startup???/

5. Dialog based app. question

6. Dialog Based App Question

7. Resizing a dialog based app based on its view's size

8. Q: dialog-based app questions .

9. How to create a Dialog based Application with MainDlg hidden on startup

10. Minimizing a dialog-based application on startup...?

11. Modeless dialog in a dialog-based app

12. dialog within dialog based apps

 

 
Powered by phpBB® Forum Software