Originally posted by bonkey
no. It is derived from CDialog.
Sorry, how is that?
CChildDlg is derived from CDialog, and not CMainDlg??

How do you cast then a CChildDlg* to CMainDlg*, when the two classes are not related at all? A dynamic_cast would throw an exception.
Code:
((CMainDlg *)m_pParent)->SaveData(data);
Is SaveData really executed - did you step in the function while debugging?