MDI is hidden behind CDialog
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: MDI is hidden behind CDialog

  1. #1
    Join Date
    Jan 2004
    Location
    Torrance
    Posts
    94

    Unhappy MDI is hidden behind CDialog

    I have a Dialog

    and when I load a MDI from that dialog,

    the MDI will hide behind the dialog.

    Even after i hide the dialog,

    I still can not access to the MDI.

    Help!
    Microsoft = Tiny software. Small software. Immature software.
    But I'm using it.

    Girl = Money x Time;
    Time = Money;
    Girl = Money x Money;

  2. #2
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354
    Are you using a modal or a modeless dialog ?

  3. #3
    Join Date
    Jan 2004
    Location
    Torrance
    Posts
    94
    I am using a modal Dialog.
    Microsoft = Tiny software. Small software. Immature software.
    But I'm using it.

    Girl = Money x Time;
    Time = Money;
    Girl = Money x Money;

  4. #4
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354
    Ok.

    First. Why do you want to hide the modal dialog ?

    Note that one of the things DoModal does is to disable the parent window. So, that is the reason, why you won't be able to use any other window when you are using a modal dialog. And that is the same reason, you are not able to use the MDI possibly. Just hiding the modal window does not change the enabled/disabled state of the parent window. So, after hiding the modal dialog, you need to enable the parent explicitly by calling EnableWindow..

    Having said that, if your app calls for being able to access the MDI even when the dialog is existing, why not use a modeless dialog. One of the things modeless dialogs do is to just hide the dialog when you click on the close button ( the dialog itself is not destroyed ).

  5. #5
    Join Date
    Jan 2004
    Location
    Torrance
    Posts
    94
    YES!! IT WORKS!

    THANK YOU SO MUCH.

    d-_-b two thumbs for you.


    HOW I DID:

    after showing up the MDI

    pMainFrame->ShowWindow(SW_SHOW);
    pMainFrame->UpdateWindow();


    I Added

    pMainFrame->EnableWindow(TRUE);
    Microsoft = Tiny software. Small software. Immature software.
    But I'm using it.

    Girl = Money x Time;
    Time = Money;
    Girl = Money x Money;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center