I program with Visual C++ 2002 (MFC Application )
I put a Edit Control on dialog and write some code in EN_UPDATE Event to run only i edit this control and press ENTER key
but when i press any key in this EDIT Control, event occurred and my code is run
similar to EN_CHANGE control event? why?

I dont see EN_KEYUP, EN_KEYPRESS in Event List of EDIT Control?

EN_UPDATE is posted when the control is in the process of repainting itself so that you can resize the control or take some other actions. This means EN_UPDATE may be posted for for events other than keyboard, such as when the window becomes in focus.

EN_CHANGE is sent when the user has taken an action that may have altered text in an edit control.

EN_KEYUP and EN_KEYPRESS events are not captured by the edit control unless you subclass it. Otherwise they are eaten up by MFC.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.