Dialog based application

Hello:

My dialog based program consisting of 1 input & 1 output boxes (for double variables) is working fine.
Now, I'd like to get the output in a second dialog window that should appear when I hit a button on the first :-x one.
The window #2 should offer a top level button for printing the output.
What should I do ?
Detailed replies will be very much appreciated as I'm only a beginner.
Thanks a lot.

My dialog based program consisting of 1 input & 1 output boxes (for double variables) is working fine.
Now, I'd like to get the output in a second dialog window that should appear when I hit a button on the first :-x one.
The window #2 should offer a top level button for printing the output.
What should I do ?
Detailed replies will be very much appreciated as I'm only a beginner.
Thanks a lot.

Frandy

Took me a lot of time to answer, didn't it?
Sorry about that, I'm a bussy man...
As other people might do this in another way, I will encourage them to post their opinion on this. I will show you how I do it (this is *my* awesome way ).

Thanks for your reply.
Unfortunately, my second dialog has been created by means of the Menu/Insert Dialog. So, you have no OnInitDialog() in the DialogTwo.cpp.
In the meantime, I've been using a list box to display the results. BUT, I don't know how to print the results on my printer by pressing a button on the main dialog.
Have you any idea?

Thanks for your reply.
Unfortunately, my second dialog has been created by means of the Menu/Insert Dialog. So, you have no OnInitDialog() in the DialogTwo.cpp.

Oh, you don't need to wory about that. You see, the OnInit method is just handling the dialog's "reaction" to an event. So, you can just add it in. I suppose you didn't create a class for your dialog either? If this is the case, just double-click the surface of your dialog box, and you'll be able to add a clas for it. You can jiust name it CDialogTwoDlg. Then, go to Class Wizard, to the "Message Map" section, and add this meesage: WM_INITDIALOG (you'll need to scroll down quite a bit). Click Add Function, and then Edit Code.

Quote:

Originally Posted by Frandy

In the meantime, I've been using a list box to display the results. BUT, I don't know how to print the results on my printer by pressing a button on the main dialog.
Have you any idea?

Thanks again.

Frandy

Well, you could do this pretty easy, if you used the Document/View architecture. Tis would imply working with a MDI or SDI application rather than a DIALOG-based one.
In case you decide to go with this, please take the time to read this (very small) tutor.
Don't get me wrong, it's not my style to point to a faq, but I think you will find this very useful.
For any concerns you might still have, please don't hesitate to ask.

Best regards,
Luci

__________________Please read these Guidelines before posting on the forum

"A person who never made a mistake never tried anything new."
Einstein