Starting Doc/View app with hidden window 
Author Message
 Starting Doc/View app with hidden window

I am trying to alter my app so that it loads a specific file on startup
(which I have done) and does not have the open/save/save as menu items.
I want to make this app run as a button on the task bar tray (which I
can do) but, how do I set up the app so that it does not display any
windows on the screen? I can call HideApplication() at the beginning of
CWinApp::InitInstance(), but this causes an assertion failure. If I call
it at the end of the method, then the window flashes up on the screen,
causing an annoying flicker.

How do I alter my app classes so that all the windows are initially
created hidden? I have tried setting m_nCmdShow to hidden and altering
the cs object in CMainFrame::PreCreateWindow() but none of this seems to
work.

Thanks in advance,
--
Jamie Walker
http://www.*-*-*.com/



Sat, 06 May 2000 03:00:00 GMT  
 Starting Doc/View app with hidden window

ShowWindow( SW_HIDE ) in CMainFrame::OnCreate should do it.

Claire Sylvestre

Quote:

>How do I alter my app classes so that all the windows are initially
>created hidden? I have tried setting m_nCmdShow to hidden and altering
>the cs object in CMainFrame::PreCreateWindow() but none of this seems to
>work.



Fri, 12 May 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ? Start a Doc/view App as Hidden ?

2. ? Start a Doc/View App as Hidden?

3. Help: Starting MFC app with its window hidden

4. Starting app with hidden window

5. Starting app with hidden window

6. MFC doc-view architecture with hidden view

7. CListCtrl as child window of a SDI app without MFC Doc/View

8. Can I have a Dialog Based Window in an MDI non doc/view app

9. How to set window title when create a new frame in non Doc/view app

10. permanent HTML window in doc/view app

11. MDI Doc/View App: Initial Window

12. Start App when Windows starts

 

 
Powered by phpBB® Forum Software