Starting MFC dialog minimized 
Author Message
 Starting MFC dialog minimized

How do I start an MFC dialog in a minimized state? I have tried ShowWindow
in the OnInitDialog and it doesn't work.

Curt



Thu, 14 Aug 2003 05:10:10 GMT  
 Starting MFC dialog minimized
Hi...

            Handle the message handler [ OnShowWindow() ] for the message
WM_SHOWWINDOW
            and call ShowWindow(SW_MINIMIZE );

Something like...

        void CMyDialog::OnShowWindow(BOOL bShow, UINT nStatus)
        {
                    ShowWindow(SW_MINIMIZE );

                    // CDialog::OnShowWindow(bShow, nStatus);

        }

Cheers
Check Abdoul
-------------------


Quote:
> How do I start an MFC dialog in a minimized state? I have tried ShowWindow
> in the OnInitDialog and it doesn't work.

> Curt



Thu, 14 Aug 2003 05:45:55 GMT  
 Starting MFC dialog minimized

Quote:
>How do I start an MFC dialog in a minimized state? I have tried ShowWindow
>in the OnInitDialog and it doesn't work.

Curt,

Adding:

        ShowWindow( SW_MINIMIZE );

at the end of OnInitDialog for an MFC dialog application works for me.

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.



Thu, 14 Aug 2003 06:04:41 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Start a dialog based application minimized

2. dialog to start minimized?

3. Starting a Dialog Based app minimized.

4. start dialog app minimized

5. Dialog-based app starting minimized

6. Starting a dialog minimized: please assist.

7. how to minimize program started with Process.Start

8. MFC UI Thread doesnt start when COM method called in multi-threaded MFC dialog App

9. Minimizing MFC dialog app

10. Q: Smart Minimize and MFC Dialog Based App

11. Start Dialog within MFC-Dll

12. Starting a Dialog based application (MFC)

 

 
Powered by phpBB® Forum Software