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!

Member variables from Dialog in Mainframe

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How can I pass parameters from Dialog to Mainframe?
 
HI

Assuming your SDI app is CFooApp and main frame is CMainFrame. Assume a member m_nIndex in CMainFrame

You can simply pass a pointer to the dialog or create the pointer when needed as this:

CFooApp* pApp = ( CFooApp*) AfxGetApp();

to reach the m_nIndex member, do :
(( CMainFrame*) pApp->m_pMainWnd)->m_nIndex ....

HTH

Thierry
EMail: Thierry.Marneffe@swing.be
 
You can change from dialog the documents variables:
... OneDialogFunction(...)
{
(GetDocument())->OneDocumentsFunction=OneDialogVariable;
return ...
} John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top