displaying dialog box with my main window.. 
Author Message
 displaying dialog box with my main window..

Hi all,

        I created a dialog box using the resource editor. Now i have to display
the dialog box together with my Main window. What are the
functions/messages that i need to override/handle..

Arun



Fri, 03 Sep 1999 03:00:00 GMT  
 displaying dialog box with my main window..

Quote:
>    I created a dialog box using the resource editor. Now i have to display
>the dialog box together with my Main window. What are the
>functions/messages that i need to override/handle..

Arun,

From what you say, it sounds like you want a modeless dialog box. If
so, you'll need a class for the dialog (use Class Wizard from the
dialog editor for your new dialog), then somewhere (possibly in your
main frame window class), you'll need a pointer to your dialog class:

CMyDlg * pMyDlg;

At some suitable point in the initialisation of your application
(creation of the main frame window maybe) you can use "new" to
create/initialise the pointer with your dialog:

        pMyDlg = new CMyDlg;

Then you can create the modeless dialog:

        pMyDlg->Create( mydialogid );

On close down you need to use DestroyWindow to get rid of the modeless
dialog:

        pMyDlg->DestroyWindow();

And you need to clean up the allocation of the dialog class:

        delete pMyDlg;

Dave
----
Address is altered to discourage junk mail.
Remove ".---" for the real address.



Sat, 04 Sep 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Displaying Dialog Box On the Main Window

2. displaying dialog box with my main window..

3. PBM: Message box not displayed after main dialog box is closed in MFC dialog-based app

4. Display a dialog window before the main Window

5. Dialog box as a main window in windows 95, using Win32 SDK only (MSVC 5.00)

6. problem with displaying dialogs from dlls in the main window

7. Dialog Box as Main Window/No debugger /4.0

8. How to describe a new main window forcurrent Dialog Box application

9. Dialog Box integrate into a main View Window

10. main dialog window is blocked by second dialog window

11. Help wanted for windows dialog boxes display

12. Displaying window while a dialog box function operates

 

 
Powered by phpBB® Forum Software