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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to access a member variables from another class?

Status
Not open for further replies.

laephy

Technical User
May 11, 2012
1
DE
I have an sdi program with two dialog boxes with its respectively classes (CDialog1 and CDialog2). Through a bottom in the 1st dialog box I call the second dialog box. In the second dialog box, the user gives the values for some variables. I know that I can obtain the values of the second dialog box from the first dialog box using m_variable=dlg.m_variable in the OnSecondDialog function.

I want to write in two files the variables given by the user in both dialog boxes. How can I access from CApplicationDoc class the values given by the user in both dialogs?
Should I define a member pointer to the CAplicationDoc class in both dialogs (CApplicationDoc *m_pointer;)?

Thanks


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top