hiding a modal dialog box 
Author Message
 hiding a modal dialog box

I'm a newbie at vc++ so pls excuse me....

I've created a dialog application and I would like the dialog box to be
hidden (not visible) once the application
starts. I've tried unchecking the Visible checkbox in the dialog
properties but it still doesn't work.

Does anyone have any ides??....I'm figuring that this should be somewhat
trivial to implement.

thanx in advance to anyone who can offer help.



Tue, 04 Dec 2001 03:00:00 GMT  
 hiding a modal dialog box

Quote:

>I've created a dialog application and I would like the dialog box to be
>hidden (not visible) once the application
>starts. I've tried unchecking the Visible checkbox in the dialog
>properties but it still doesn't work.

There is sample code explaining how to create an invisible
dialog-based application on my website (URL in my sig below). It's tip
#26 on the Win32 code page.

Bob Moore [MVP]
http://www.mooremvp.freeserve.co.uk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Due to an unreasonable amount of queries, I no
longer answer unsolicited email questions. Sorry,
no exceptions.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Tue, 04 Dec 2001 03:00:00 GMT  
 hiding a modal dialog box
    Am I missing something ? When you hide a modal dialog box, you will not
be able to do anything at all since the control of the program will be given
to the modal dialog (DoModal will not return) and you are not able to click
anything on a hidden dialog. I normally hide only modeless dialog boxes.

ltkhoo

Quote:

> I'm a newbie at vc++ so pls excuse me....

> I've created a dialog application and I would like the dialog box to be
> hidden (not visible) once the application
> starts. I've tried unchecking the Visible checkbox in the dialog
> properties but it still doesn't work.

> Does anyone have any ides??....I'm figuring that this should be somewhat
> trivial to implement.

> thanx in advance to anyone who can offer help.



Wed, 05 Dec 2001 03:00:00 GMT  
 hiding a modal dialog box

But you 'can' temporarily hide the dialog using...

if (pDialog->GetParent())
    pDialog->GetParent()->EnableWindow(TRUE);
pDialog->ShowWindow(SW_FALSE);

When you reshow the dialog, do not forget to disable the parent again...

--
Mark Webb
Software Engineer, AutoCAD Architectural Desktop
Autodesk, UK

--
All thoughts in this posting are my own, and may not reflect the opinions or
position of Autodesk Inc
--


Quote:
>     Am I missing something ? When you hide a modal dialog box, you will
not
> be able to do anything at all since the control of the program will be
given
> to the modal dialog (DoModal will not return) and you are not able to
click
> anything on a hidden dialog. I normally hide only modeless dialog boxes.

> ltkhoo


> > I'm a newbie at vc++ so pls excuse me....

> > I've created a dialog application and I would like the dialog box to be
> > hidden (not visible) once the application
> > starts. I've tried unchecking the Visible checkbox in the dialog
> > properties but it still doesn't work.

> > Does anyone have any ides??....I'm figuring that this should be somewhat
> > trivial to implement.

> > thanx in advance to anyone who can offer help.



Thu, 06 Dec 2001 03:00:00 GMT  
 hiding a modal dialog box
Minor detail: ShowWindow does not take FALSE as a value. It takes
SW_HIDE and SW_SHOW. You might also look into using tray icons to make
the hidden app accessible. I also change OnClose to re-hide, rather
than close, the app, so that hitting the "Close" button in the top
right just re-hides it, as does the close menu item. I then add an
"Exit" button to the dialog that actually terminates it. You can also
look into how to add new items to the system menu to add an "Exit"
menu item and/or change "Close" to "Hide".
                                        joe

On Sun, 20 Jun 1999 10:02:07 +0100, "Mark Webb"

Quote:

>But you 'can' temporarily hide the dialog using...

>if (pDialog->GetParent())
>    pDialog->GetParent()->EnableWindow(TRUE);
>pDialog->ShowWindow(SW_FALSE);

>When you reshow the dialog, do not forget to disable the parent again...

>--
>Mark Webb
>Software Engineer, AutoCAD Architectural Desktop
>Autodesk, UK

>--
>All thoughts in this posting are my own, and may not reflect the opinions or
>position of Autodesk Inc

Joseph M. Newcomer

http://www3.pgh.net/~newcomer


Sat, 08 Dec 2001 03:00:00 GMT  
 hiding a modal dialog box
First, on initial dialog set timer to on second. This will call the OnTimer
function. So, you have to override the OnTimer function in your dialog. In
the OnTimer function call the ShowWindow(SW_HIDE).
Quote:

>I'm a newbie at vc++ so pls excuse me....

>I've created a dialog application and I would like the dialog box to be
>hidden (not visible) once the application
>starts. I've tried unchecking the Visible checkbox in the dialog
>properties but it still doesn't work.

>Does anyone have any ides??....I'm figuring that this should be somewhat
>trivial to implement.

>thanx in advance to anyone who can offer help.



Mon, 25 Feb 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Hiding a modal dialog box

2. Hiding a main modal dialog box

3. Modeless dialog box together with modal dialog box

4. List boxes in Modal Dialog Box

5. Modeless Dialog box in a Modal Dialog Application...

6. Post message from modal dialog to modeless dialog box....urgent!!!!!!!!!!!!!!1

7. Hiding a Modal Dialog

8. I want to hide modal dialog after domodal...

9. Modal dialog hidden behind other windows in XP

10. Hide a Modal Dialog Imediatly Upon Startup

11. how to modal make dialog initial hidden

12. Hiding A Modal Dialog During App Statup

 

 
Powered by phpBB® Forum Software