CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2010
    Posts
    136

    Problem with Modal Dialog

    I have multiple dialog applications. One dialog opens the another dialog. I am opening a Dialog say Dialog 2 from Dialog1 by calling DoModal() method. I am opening an another dialog say Dialog3 from Dialog2 using the same method DoModal(). Even after opening Dialog3 i can access Dialog2 just like Dialog3 is a modeless dialog. But i want Dialog3 to be Modal so that as long as Dialog3 is open user can't access dialog2.

    Please HELP

    ABM

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Problem with Modal Dialog

    Do you mean multiple applications, or one application with multiple dialogs?

  3. #3
    Join Date
    Jun 2010
    Posts
    136

    Re: Problem with Modal Dialog

    one application multiple dialogs. sorry for confusion

    ABM

  4. #4
    Join Date
    Jun 2010
    Posts
    136

    Re: Problem with Modal Dialog

    Is this possible to have modal dialog over another modal dialog in one application. That's what i am asking. If yes, so what i am doing wrong?

    Please HELP!!!

    ABM

  5. #5
    Join Date
    Jul 2010
    Posts
    8

    Re: Problem with Modal Dialog

    I tested what you said. I have three dlg.
    in a button of dlg1, I make dlg2 DoModel, code link:
    void CDlgA::OnButton1()
    {
    // TODO: Add your control notification handler code here
    CDlgB dlg_b;
    dlg_b.DoModal();
    }

    and in a button of dlg2, I make dlg3 DoModel,

    and after opening Dialog3 , I can not access Dialog2

    so I wonder how you create your dialog?

  6. #6
    Join Date
    Jun 2010
    Posts
    136

    Re: Problem with Modal Dialog

    I am not sure why its not working. Even i open a CColorDialog which supposed to be a modal dialog from mfc. But i still able to access the dialog which opens CColorDialog. I am confused. Supposed to be the simplest thing, but still it is very complex.

    I need help. There has to be wrong with some my dialog properties which is making it behave like that.

    Regards
    ABM

  7. #7
    Join Date
    Jul 2010
    Posts
    8

    Re: Problem with Modal Dialog

    you'd better put your code about how you open your dialog and what property it have

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured