Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MDI app: passing data from Main frame to child frame

45 views
Skip to first unread message

pbru...@yahoo.com

unread,
Feb 8, 2013, 7:31:17 AM2/8/13
to
Hi all, I am creating a MDI app using MS VC++ and I want the children to share some common data. How can I pass these from the main frame (mainfrm.cpp) to the child windows (childfrm.cpp)?
TIA
Phil

ScottMcP [MVP]

unread,
Feb 8, 2013, 8:58:28 AM2/8/13
to
You can iterate through all document templates, all documents and all views using GetFirstDocumentTemplatePosition, GetFirstDocPosition, GetFirstViewPosition and related functions.

pbru...@yahoo.com

unread,
Feb 8, 2013, 9:42:34 AM2/8/13
to
thanks!

Miles Davies

unread,
Aug 19, 2013, 10:30:39 AM8/19/13
to
in your children....

auto pMain = DYNAMIC_DOWNCAST(CMainFrame, AfxGetMainWnd()) ;
ENSURE(pMain);
auto data& = pMain-> call some function to access data;
0 new messages