In modal dialog read data of calling dialog 
Author Message
 In modal dialog read data of calling dialog

Sorry if this is a dull question - I don't know the solution and also
couldn't find it in earlier postings.

I have a dialog-based application. In its main dialog I fill an array with
data I get from somewhere.
In the main dialog there is a button which opens a second modal dialog in
which I can view the contents of the array.

My actual solution: In my main dialog I have arMainArray ... I declared an
array of identical structure in the class of the second dialog. When calling
the second dialog I copy all items of the main dialog's array to the array
of the second dialog, then call DoModal.

I am sure this is not the most clever solution. I'd like to have access in
the second dialog to the main dialog's array, but don't know how to code
this. Does anybody have suggestions?

Thank you
Thomas



Thu, 27 May 2004 23:37:54 GMT  
 In modal dialog read data of calling dialog
Put a pointer in your second dialog that is in the array format.

then have something like

CSecondDialog dlg;
dlg.dataPtr=mydatahere;

dlg.DoModal();

You can then access the data with dataPtr

Robin

Quote:
> Sorry if this is a dull question - I don't know the solution and also
> couldn't find it in earlier postings.

> I have a dialog-based application. In its main dialog I fill an array with
> data I get from somewhere.
> In the main dialog there is a button which opens a second modal dialog in
> which I can view the contents of the array.

> My actual solution: In my main dialog I have arMainArray ... I declared an
> array of identical structure in the class of the second dialog. When
calling
> the second dialog I copy all items of the main dialog's array to the array
> of the second dialog, then call DoModal.

> I am sure this is not the most clever solution. I'd like to have access in
> the second dialog to the main dialog's array, but don't know how to code
> this. Does anybody have suggestions?

> Thank you
> Thomas



Fri, 28 May 2004 00:03:16 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Passing data from a modal dialog to the main dialog

2. Modeless dialog called from Modal dialog woes.

3. modal dialogs on top of modal dialogs...

4. Showing a modal dialog in a modal dialog application

5. modal dialog spawning a modal dialog

6. Modal dialog over a modal dialog ( How to...?)

7. Getting data to modal dialog ...need help please

8. How to retrieve data from the control in the Modal dialog

9. Win32 specific: Calling modal dialog box from a console application

10. VC++ ERROR WHEN CALLING NON-MODAL DIALOG IN VB6 DLL

11. calling modal message dialog from external dll

12. Modal dialog called with DoModal() changes to modeless

 

 
Powered by phpBB® Forum Software