
? Start a Doc/view App as Hidden ?
Quote:
>I am writing an app that utilises MFC Doc/View. However, the default start
>up mode for the app is as a icon in the sys tray. Therefor the application
>should start as hidden.
>How can I initialise the doc/view without creating a visible window?
>The obvious method :
>m_pMainWnd->ShowWindow(SW_HIDE);
>called during CMyApp::InitInstance()
>causes the window to flash on then off as the window has already been shown
>by the call to
>ProcessShellCommand(cmdInfo);
Jeroen,
I think this will prevent the flash:
// Dispatch commands specified on the command line
m_nCmdShow = SW_HIDE;
if (!ProcessShellCommand(cmdInfo))
return FALSE;
Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.