MS Visual C++ 6.0...
I am trying to get a simpy dialog based program running, but
I am having difficulty getting an integer value out of an edit box.
It takes two values out of an edit box and then returns the area of a rectangle with those lengths in a third edit box.
I have associated an integer variable with the edit box control, but it doesn't get updated when the number in the box changes. This box is buddied with a spin control, so I can either type in a number or inrement it with the spinner.
I have tried adding the "UpdateData()" function inside the "onChange" call for the edit box, but that causes an assertion error when running in debug.
ideas?



LinkBack URL
About LinkBacks



I had been using "atoi" previously, but I thought there should be a better way to get an integer value out of the edit box. By defining it's value as an integer, it will only allow integer inputs, but I still had to pick up the contents as a string and then convert it.