Q:How do I start a Dialog App in a HIDE state 
Author Message
 Q:How do I start a Dialog App in a HIDE state

Visual C++ 5.0/Win95
I'm doing a Dialog based App that shows a animated icon in the tray area.
When starting, the Dialog should not show itself.  I've tried to override
OnInitDialog to make a ShowWindow( SW_HIDE) at the end of the initialization
process but it fails.
I override OnShowWindow
void CTrayDollarDlg::OnShowWindow(BOOL bShow, UINT nStatus)
{
static BOOL bFirst = TRUE;
if( bFirst && bShow ){
  CDialog::ShowWindow( SW_HIDE );
   bFirst = FALSE;
  return;

Quote:
}

CDialog::OnShowWindow(bShow, nStatus);
Quote:
}

but unsuccessful. I did make sure to have the visible style off either.
I do appreciate if you have any hint about this.
Dalmer Azevedo


Fri, 04 Aug 2000 03:00:00 GMT  
 Q:How do I start a Dialog App in a HIDE state

Search www.dejanews.com for author  David Lowndes and "CDialog and Hide".
David has given some solution for this in some prev. posts.

--
Girish Bharadwaj [VC++/MVP]

Quote:

>Visual C++ 5.0/Win95
>I'm doing a Dialog based App that shows a animated icon in the tray area.
>When starting, the Dialog should not show itself.  I've tried to override
>OnInitDialog to make a ShowWindow( SW_HIDE) at the end of the
initialization
>process but it fails.
>I override OnShowWindow
>void CTrayDollarDlg::OnShowWindow(BOOL bShow, UINT nStatus)
>{
>static BOOL bFirst = TRUE;
>if( bFirst && bShow ){
>  CDialog::ShowWindow( SW_HIDE );
>   bFirst = FALSE;
>  return;
>}
>CDialog::OnShowWindow(bShow, nStatus);
>}
>but unsuccessful. I did make sure to have the visible style off either.
>I do appreciate if you have any hint about this.
>Dalmer Azevedo



Fri, 04 Aug 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

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

2. A: How to start dialog-based app hidden

3. Can I start a dialog app initially hidden?

4. How to Start Dialog App Hidden?

5. Can I start my SDI app hidden?

6. Starting app with hidden window

7. Help: Starting MFC app with its window hidden

8. Q: Start App hidden

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

10. Main dialog initially hidden, how? (mfc dialog app)

11. Starting Doc/View app with hidden window

12. Starting app with hidden window

 

 
Powered by phpBB® Forum Software