I'm new to C++ programming and apologize for asking such a basic question, but how do you display, in an edit box on a dialog form, the contents of a variable into which you have read a line from a text file? Thanks in advance!
You can do 2 things:
1. Easiest: Use ClassWizard->Member Variables to assign a CString variable to the edit box you are using and then fill the string with the value you need.
2. "Api-est":Inside the dialog class, use SetDlgItemText method to set the text of the specified control.
In both cases, you should make use of these methods inside the DoDataExchange method. Be sure to check for the bSaveAndValidate flag of the CDataExchange pointer passed to the method.
If this is set to true, the method is called upon dialog initialization and you may set your text there.
If false, the method gets called upon dialog closing (or, if you want, for data validation). [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal... once stated: methane@personal.ro
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.