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
    Apr 1999
    Posts
    27,449

    Re: Pointer to all opened dialogs.

    Why not create your own static array (or vector) of pointers to the dialogs? When a dialog is opened, store the "this" pointer of the dialog in the static array. When the dialog is closed, remove the pointer from the static array. The static array can be declared in the main dialog class.

    Regards,

    Paul McKenzie


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