Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Parameters between Dialog Boxes

Status
Not open for further replies.

skyadel

Technical User
Dec 10, 2000
1
SG
Say a user would open up DialogA (modal). From Dialog A, the user click on a button to open DialogB (modal). In DialogB, the user will key in a value (double) into an edit box. How do I pass this value to another edit box on DialogA (which I would like it to appear to show an updated display) after the user close DialogB?
I encountered problem because there is no longer any INIT because DialogA is already opened... Is there any way to do things like UpdataData(); ???

By the way, I have already declared a global variable. Say double GlobalVar.
In a header file... I have extern double GlobalVar.
Then I include this header into the related source files of both Dialog A & B.

I'm a beginner and examples would be greatly appreciated. Thanks!
 
> I'm a beginner and examples would be greatly appreciated. Thanks!

For beginners, the most important activity would be to obtain a beginners book. If that is not possible, you can learn to use the many freely available samples and articles from Microsoft. They can be found on MSDN online at
Hope this helps
-pete
 
Dear Friend,You may also try to use the friend functions which can access member variables form wach of the dialog boxes.thanks
colgoldie
 
Have you tried using a pointer? Create the pointer in
DialogA, You'll have to overload your DialogB constructor, Then, create the object for dialogb, pass the pointer to your dialogb constructor, in your constructor initialize your global pointer for that dialog to the pointer you passed in.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top