Hello everyone,
I have a problem,
I have to get value from edit box, store it in variable and based on that value need to update another edit box.
Please tell me how can i get inter value, which is entered by user in visual c++.
Hello everyone,
I have a problem,
I have to get value from edit box, store it in variable and based on that value need to update another edit box.
Please tell me how can i get inter value, which is entered by user in visual c++.
You don't call DoDataExchange() directly. To cause that function to be called you have to call UpdateData() then MFC will call DoDataExchange(), which will transfer the data from the windows control to your variables, assuming you gave variable names to the controls. If you didn't do that then UpdateData() will do nothing. In that case you have to do it manually, which can be a big pain, but not impossible.
GetDlgItemInt retrieves the value from the edit box and returns it as an integer, so long as you're using Win32 API this should work fine.
Yes, and that function can also be used in MFC programs.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.