
Starting app with hidden window
You must reset the visibility-flag in the window's CREATESTRUCT correctly
BEFORE Create()ing it. You might do it in the PreCreateWindow()-function of
your window-class, which then should contain:
virtual BOOL myWnd::PreCreateWindow(CREATESTRUCT &cs)
{
if( !CWnd::PreCreateWindow(cs) ) // enter your specific base class
instead of CWnd
return FALSE;
cs.style &= ~WS_VISIBLE; // now the primary state is "hidden"
return TRUE;
Quote:
}
You might also mask it out when calling the Create()-function by setting its
dwStyle-Parameter as you wish.
Quote:
> Hi All:
> I seem to be unable to start an SDI app with the window hidden.
> I can make the window flash briefly and then go away
> by using:
> CWinApp::InitInstance(...)
> {
> ...
> m_pMainWnd->ShowWindow(SW_HIDE);
> ...
> }
> but I want it not to flash at all.
> I have a view derived from CFormView (not CView).
> Thanks, Ido.