ASingerMustDie
Programmer
Hi Everyone
In a modal dialog box, I wish to change the contents of one CEdit control each time the contents of another CEdit control are changed.
To do this, I created a function for the EN_CHANGE member function of the latter control as follows:
void test::OnChangeCedit2()
{
CString c2;
m_cedit2.GetWindowText(c2);
m_cedit1.SetWindowText(c2);
}
However, once the dialog is opened (DoModal) from another, VC++ itself crashes (Debug Assertion Failed).
My guess is that this is due to the function being executed when the dialog is first created, presumably before all the controls can be referred to...is this true?
If so, how can it be fixed? If not...how can it be fixed?
Thanks in advance
ASMD
In a modal dialog box, I wish to change the contents of one CEdit control each time the contents of another CEdit control are changed.
To do this, I created a function for the EN_CHANGE member function of the latter control as follows:
void test::OnChangeCedit2()
{
CString c2;
m_cedit2.GetWindowText(c2);
m_cedit1.SetWindowText(c2);
}
However, once the dialog is opened (DoModal) from another, VC++ itself crashes (Debug Assertion Failed).
My guess is that this is due to the function being executed when the dialog is first created, presumably before all the controls can be referred to...is this true?
If so, how can it be fixed? If not...how can it be fixed?
Thanks in advance
ASMD