Simply put I wish for text entered in one edit box to then appear in another edit box. I have created a MFC dialog and read many tutorials, but I'm still stuck.
Here is my current DDX function:
void Ctextentry23Dlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Text(pDX, IDC_EDIT1, name);
DDV_MaxChars(pDX, name, 20);
DDX_Text(pDX, IDC_EDIT2, name2);
}
I tried adding the line
pDX->m_bSaveAndValidate(FALSE);
but this results in "error C2064: term does not evaluate to a function taking 1 arguments"
I was able to get it work by clicking a button by adding the event handler with the following:
void Ctextentry23Dlg::OnBnClickedButton1()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
name2 = name;
UpdateData(FALSE);
mywork.mystring = name2;
}
But I'd like to get this to work without pushing a button.
Thank you!