ducksoup
asked on
Passing values between dialogs.
I have an SDI application with a formview. I have popup modeless and modal dialogs. I would like to share variables between these dialogs.
Would you please give me an example of how I can pass variables.
Thank you
Would you please give me an example of how I can pass variables.
Thank you
You can either create a global variable, or declare the variable in one class, and pass a pointer to the other class.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
fstab: Please post as comment, until an answer is accepted. Otherwise, the question is locked, keeping other experts from viewing it.
That's the basic idea - if I think I have the answer I should post it as an answer - other experts can still view it and post a comment .. in case my answer is rejected the person who posted the correct answer as a comment can still get points .. its all in the hands of (in this case) ducksoup ..
Hi,
The best way(and the commonly used method) is to declare those variables in App class and access them anywhere in the application.
If Ur application is Test
then declare the flag(for ex) m_bFlag in CTestApp.h
Then U can access it as
((CTestApp *)AfxGetApp())->m_bFlag
Try it out.
The best way(and the commonly used method) is to declare those variables in App class and access them anywhere in the application.
If Ur application is Test
then declare the flag(for ex) m_bFlag in CTestApp.h
Then U can access it as
((CTestApp *)AfxGetApp())->m_bFlag
Try it out.