How to not show main app window and shoe modelss dialog boxes

How to not show main app window and shoe modelss dialog boxes

Post by Ahmed Qaz » Sun, 15 Sep 2002 06:55:09



Hi

I will really appreciate if some one could give me quick hint as to how NOT
to show my main window (MFC MDI-APP) and show some modeless dialog boxes
that the app creates ... after coming up.

If I let my main MDI app come up, then create my mode-les dialog boxes and
hide the app then, the mode-less dialogs are also hidden alongwith it.I have
been able to get round this by "creating" but not "showing" duing
InitInstance(0 and it works. Modeless dialog boxes show up where as app's
main window does not.

Hoever I was wondering if there is a better and the "right" way of doing so
..because this solution fails when I try to use a progress bar which needs
the main window as its parent!. In m yscenario, when mai nwindow is hidden,
my progress bar never shows up, therefore!

Thanks
Ahmed

 
 
 

1. OWL question: display a login dialog box before main window shows

Hi, everyone, I need your help now.

I am writing a program with login check. What I really want is to present
a welcome box first with User_ID and User_Password input and then jump
to the main window after user passes the login check.

Following is the code I wrote so far in Borland's OWL, which always
generates the main window first and then displays a welcome box.  I know
by executing TApplication::InitInstance() will display the main window.
Now my question is how to display a dialog box before the main window is
shown up on the screen? Displaying a dialog box needs a window's handle,
so before the main window is created, how do I handle the dialog box?

Thanks in advances!

Webb

------------------------------------------------------------------------
void myApp::InitInstance ()
{
        TApplication::InitInstance();
        if (TWelcomeDlg(GetMainWindow(), Transfer).Execute() ==
                 IDOK)
        {
                string info;
                info += Transfer.UserID;
                info += "\n";
                info += Transfer.UserPassword;
                info += "\n";

                Transfer.UserID[0]=0;
                Transfer.UserPassword[0]=0;

                GetMainWindow()->MessageBox(info.c_str(),
                                            "Login Results", MB_OK);
        }
        else
                GetMainWindow()->CloseWindow();
--------------------------------------------------------------------------

2. Batteries for Chaplet Halikan laptops

3. edit box in dialog app not showing unicode

4. BA's Winpoet 3.0 posted

5. Dialog owned by main window not hidden when main minimized

6. bnf macros (bug update)

7. Windows XP Dialog Box in C++ App Not Displayed Properly

8. WIN/OS2: What exactly does "separate session" mean?

9. Dialog box as main window, how to in Windows 3.1?

10. Dialog App / Dialog App / Dialog App

11. Dialog box doesn't show if BC4.5 not running?

12. dialog box shown in NT 4.0 but not in Win95

13. How to change a size of edit box while sizing main dialog box?