I am new to mfc programming and I am working on a very simple program. All I have is an edit box. I want the user to enter a number and then I update the variable that represents that number. However, I cant seem to get what I want. The id of the edit box is IDC_MSG. The variable attached to it is m_strMessage of type int.
I want the variable to update whenever the user enters a new value and then hits the enter key. I am not sure which message to use. I tried EN_CHANGE and EN_UPDATE and placed UpdateData(TRUE) in those functions.
What happened though is the the function was called any time the data was changed (after each keystroke), when I want it to work only after the enter key is hit.
(If the function is called any time the data is changed, the check to see if the int is in the proper min-max range occurs each time and that messe things up).
If anything is unclear please let me know and I will do my best to clarify it.
Thanx for the help,