Transfer data from child to parent MFC Dialog

时间:2016-04-04 18:12:48

标签: c++ mfc

Help me please to find a solution. I want to pass data from child MFC dialog EditBox to parent dialog CString variable after close the child dialog. I open the child dialog from parent MFC Property page this way:

    void ParentDialog::OnButtonClicked()
{

    ChildDialog child = new ChildDialog(this);       
    child->DoModal();
    CString parentdata = child->m_data;// m_data holds data from EditBox


}

But anytime i close the child dialog, m_data is not available to parent. Help me please to pass data that i entered in child EditBox to parent CString variable. Thank you very much.

0 个答案:

没有答案