Simple dialog based app not working

I'm thinking about moving from Visual Studio 6 to VS 2005. I've installed VS 2005 Beta 2. I've created a simple dialog based app, added a edit control with a variable, and added OnBnClickedOk function. In the OnBnClickedOk function I added the following code:

void CTestAppDlg::OnBnClickedOk()
{
UpdateData( TRUE );
AfxMessageBox( m_strMessText );
//OnOK();
}

When I run the app the message box is empty. Any ideas what I'm doing wrong?

Thanks for the help,
Brian

[629 byte] By [BrianM] at [2007-12-16]
# 1

Hi,

Something is wrong with how you do data exchange with the control. Check that you have DDX_Text in DoDataExchange().

Thanks,
Nikola
VC++

NikolaDudar at 2007-9-9 > top of Msdn Tech,Visual C++,Visual C++ General...
# 2

Thanks Nikola,

It works now. The following was missing:
//{{AFX_DATA_MAP(CHelloDialogDlg)
DDX_Text(pDX, IDC_EDIT1, m_strHelloText);
/
/}}AFX_DATA_MAP

All I did was add a member variable for the edit control like I do in Studio 6. Why didn't it add it for me?

Thanks again,
Brian

BrianM at 2007-9-9 > top of Msdn Tech,Visual C++,Visual C++ General...
# 3
I have just tried it on July CTP and it added this text. I guess, I am not sure why this did not work for you. If you have stable repro, consider opening a bug on lab.msdn.microsoft.com.

Thanks,
Nikola
VC++

NikolaDudar at 2007-9-9 > top of Msdn Tech,Visual C++,Visual C++ General...
# 4
Nikola,
Thanks again for your time.
Brian
BrianM at 2007-9-9 > top of Msdn Tech,Visual C++,Visual C++ General...