Access to controls in child dialogs

Hello everybody !
With vs2008 – Smart Device – MFC – dlg
I have a project named Test1 :
1- a Tab Control in class Test1 and a variable m_tbCtrl added to it
2- class MYTabCtrl a drived class for CtabCtrl
3- 2 child dialogs and classes added to them MyDlg1 and MyDlg2
4- an Edit Control in MyDlg1 and a variable myEdit1 added to it
5- #include "MyTabCtrl.h" #include "MyDlg1.h" #include "MyDlg2.h" and MyDlg1* DDDD; in Test1.h

In Test1.cpp there is button control and code :

void CTest1Dlg::OnBnClickedButton1()
{
DDDD=new MyDlg1();
int jjj=DDDD->myEdit1.GetDlgCtrlID();
}
It gives error when the Button is pushed . I am just trying to have access to the edit control in the child dialog MyDlg1 from the parent dialog Test1.

I appreciate an instructive help . Mo.
Topic archived. No new replies allowed.