CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    22

    Pointer to all opened dialogs.

    Dear friends,

    I am working on a project which has dialog based interface. I have one main (Modal ) dialog & several Modeless Dialogs.

    I am creating all these modeless dialogs in "OnInitDialog" function of main dialog. I make them visible as soon as user click a button
    related to that dialog.

    Now the problem as when user click "End Task" button in one modeless dialog. I should "HIDE" another currently activated dialog.
    This "End Task" Button is on a modeless dialog (which will be visible throughout the execution of my project)
    which was also created in main dialogs "OnInitDialog" function.

    Can anyone tell me how can get a pointer to all the dialogs that are being used.

    Thanks in advance.


  2. #2
    Join Date
    May 1999
    Location
    Republic of Korea
    Posts
    74

    Re: Pointer to all opened dialogs.

    1. Reserve the pointers to every child modeless dialog boxes at the parent dialog box.
    2. Reserve the pointer to the parent dialog box at each child modeless dialog boxes.
    3. When the child modeless dialog box is closed, make the child modeless dialog boxes send some message to the parent dialog box(or call some method of the parent) with its own pointer.
    4. Then you can delete the child from the reserved child list.




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