Click to See Complete Forum and Search --> : Pointer to all opened dialogs.


nagi
May 18th, 1999, 10:19 PM
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.

Paul McKenzie
May 19th, 1999, 03:44 AM
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