Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CEdit Updates (EN_CHANGE)

Status
Not open for further replies.

ASingerMustDie

Programmer
Feb 1, 2001
17
GB
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
 
I cannot reproduce the problem. I would suspect that code other than what you posted is responsible for the condition.

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top