Can I start my SDI app hidden? 
Author Message
 Can I start my SDI app hidden?

Hi

Sorry If this has been covered recently..

I have a simple SDI client application which displays a number of controls.
These have to be populated before the application is used, which takes about
20 seconds.  So I wish show a splash screen, and keep the application
hidden/minimized until all the data is loaded and the controls are
populated.

The problem is starting the application hidden (or minimized).  I tried
doing this in the CMainFrame::OnCreate() method. I have tried setting style
member of LPCREATE to WS_MINIMIZE. I have also tried using
ShowWindow(SW_HIDE) but the window always seems to be drawn by the time
control returns to CMainFrame::InitInstance() !!!!

I can almost achieve what I need by hiding the main application (using
ShowWindow(SW_HIDE)) just after CMainFrame::ProcessShellCommand() is called
in MainFrame::InitInstance() .... But you see the MainFrame flickering as it
is drawn quickly, then hidden.

So.. can anyone suggest the best way to startup my SDI application hidden or
minimized?

Hope this is clear.

Thanks
Rob.

--
Rob Hutton



Sat, 27 Aug 2005 11:41:09 GMT  
 Can I start my SDI app hidden?
You should be able to do it in CMainFrame::ActivateFrame(...).


Quote:
> Hi

> Sorry If this has been covered recently..

> I have a simple SDI client application which displays a number of
controls.
> These have to be populated before the application is used, which takes
about
> 20 seconds.  So I wish show a splash screen, and keep the application
> hidden/minimized until all the data is loaded and the controls are
> populated.

> The problem is starting the application hidden (or minimized).  I tried
> doing this in the CMainFrame::OnCreate() method. I have tried setting
style
> member of LPCREATE to WS_MINIMIZE. I have also tried using
> ShowWindow(SW_HIDE) but the window always seems to be drawn by the time
> control returns to CMainFrame::InitInstance() !!!!

> I can almost achieve what I need by hiding the main application (using
> ShowWindow(SW_HIDE)) just after CMainFrame::ProcessShellCommand() is
called
> in MainFrame::InitInstance() .... But you see the MainFrame flickering as
it
> is drawn quickly, then hidden.

> So.. can anyone suggest the best way to startup my SDI application hidden
or
> minimized?

> Hope this is clear.

> Thanks
> Rob.

> --
> Rob Hutton



Sat, 27 Aug 2005 18:57:19 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Still trying to hide the SDI main window on start-up

2. Starting MFC SDI app maximixed?

3. Starting an SDI app

4. Start an SDI App without a Document?

5. Question: Starting an SDI app maximized

6. Question: Starting an SDI app maximized

7. Start SDI app without new document?

8. starting an SDI app

9. How to Start Dialog App Hidden?

10. Help: Starting MFC app with its window hidden

11. HOWTO: hide dialog when a dialog-based app starts

12. Starting app with hidden window

 

 
Powered by phpBB® Forum Software