Edit control boxes
-
Hello, I'm developing an interface in visual C++ 6.0...I have some boxes to input data. The program should be able to identify what data was inputted..that is I have three boxes and I just want to change the contents of the third one, if I type twice the tab-key, the contents will be no changed, but if I type something, how can the program know that the contect is being changed, or the contents remaind the same?. I have tried with the OnkillfocusFUNCTION so to detect that i'm moving from one to another. inside the the function I'm using UpdateData() to retreive the data, but how can i implement the identification of the contents-update without having to ask for a previous value. in code this seems like: if (field_code != old_value) //do something else //continue Is there anyother eaier way to do this? Thanks, Eric Manuel Rosales Pena Alfaro PhD student Unversity of Essex Wivenhoe Park Colchester, CO4 3SQ Essex, Uk email: emrosa@essex.ac.uk tel: +44-01206-87311
-
Hello, I'm developing an interface in visual C++ 6.0...I have some boxes to input data. The program should be able to identify what data was inputted..that is I have three boxes and I just want to change the contents of the third one, if I type twice the tab-key, the contents will be no changed, but if I type something, how can the program know that the contect is being changed, or the contents remaind the same?. I have tried with the OnkillfocusFUNCTION so to detect that i'm moving from one to another. inside the the function I'm using UpdateData() to retreive the data, but how can i implement the identification of the contents-update without having to ask for a previous value. in code this seems like: if (field_code != old_value) //do something else //continue Is there anyother eaier way to do this? Thanks, Eric Manuel Rosales Pena Alfaro PhD student Unversity of Essex Wivenhoe Park Colchester, CO4 3SQ Essex, Uk email: emrosa@essex.ac.uk tel: +44-01206-87311
The way I'd do this is to use EM_GETMODIFY/EM_SETMODIFY. If you're using MFC, the easiest way may be to modify the DoDataExchange function so that after setting the text for the edit controls (if they're bound to member variables) you then use EM_SETMODIFY to say the controls aren't modified. In the case where you're reading them, then use EM_GETMODIFY to find out if the user made a change. This means you don't have to cache the values. Steve S [This signature space available for rent]
-
Hello, I'm developing an interface in visual C++ 6.0...I have some boxes to input data. The program should be able to identify what data was inputted..that is I have three boxes and I just want to change the contents of the third one, if I type twice the tab-key, the contents will be no changed, but if I type something, how can the program know that the contect is being changed, or the contents remaind the same?. I have tried with the OnkillfocusFUNCTION so to detect that i'm moving from one to another. inside the the function I'm using UpdateData() to retreive the data, but how can i implement the identification of the contents-update without having to ask for a previous value. in code this seems like: if (field_code != old_value) //do something else //continue Is there anyother eaier way to do this? Thanks, Eric Manuel Rosales Pena Alfaro PhD student Unversity of Essex Wivenhoe Park Colchester, CO4 3SQ Essex, Uk email: emrosa@essex.ac.uk tel: +44-01206-87311
Simply use EN_CHANGE event of Edit control