Make a member variable of type D1 if it needs to access specific functions of D1. It would be better if you made it a CWnd*, but if you really need to make it D1, that works. I'll call this member m_pD1.
In the constructor, put this:
m_pD1 = (D1*)pParent;
Then just call the other functions like this:
if(m_pD1 != NULL)
m_pD1->D1MemberFunc();