Jul 30, 2003 #1 kvant13 Programmer Joined Jul 9, 2003 Messages 12 Location GE I have to use two Dialogs(CDialog). D1(parent) and D2(child). I use (CWnd* pParent, it points D1) in D2 dialog constructor. And it works. But How can I call member Function from D1 in D2????? Thanks
I have to use two Dialogs(CDialog). D1(parent) and D2(child). I use (CWnd* pParent, it points D1) in D2 dialog constructor. And it works. But How can I call member Function from D1 in D2????? Thanks
Jul 30, 2003 #2 Zyrenthian Programmer Joined Mar 30, 2001 Messages 1,440 Location US If you cast the parent to the appropriate type it will work if it is public: Example D2:2(CWnd* pParent): m_pParent(pParent) { ((D1*)pParent)->MemberFunction(params); } Matt Upvote 0 Downvote
If you cast the parent to the appropriate type it will work if it is public: Example D2:2(CWnd* pParent): m_pParent(pParent) { ((D1*)pParent)->MemberFunction(params); } Matt