Class Wizard doesn't allow the option of CString for a CEdit object vs2012 vc++

I have a CEdit control, and in the class wizard, I want to attach a CString to that control  I know that I've done it before, as I can find examples of previous code where this relationship exists.  I know that I can get the value with GetWindowsText(), and am able to do that, but can't help but wonder what I am doing wrong/different to keep CString from being one of the options.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Check out ("A Beginners Guide to Dialog Based Applications - Part One") and especially the section "Assigning Member variables to Controls", which describes that in detail. Maybe that helps to get you going.
open the 'Resource View' (which is another tab beside 'Solution Explorer'). you also could click on the .rc file of yor mfc project in the solution tree. in both cases you see the resource tree and could open the dialog resource of your form where you want to attach the CString member. select the edit control and right-click on it. the context menu will offer to 'Add a Variable...'. then a wizard dialog opens.

first, choose 'Variable' from Category combobox.

second, choose CString for 'Variable Type' and add a member variable name such as m_strText.

the member will be added to the dialog class and an entry to DoDataExchange member function would be added to support exchange in both directions (also the first call would do the attach and subclassing).

to put text from member to screen call UpdateData(FALSE);

to get user input from screen to member call UpdateData(TRUE);

both calls must be done in member functions of the dialog class.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rickhill11Author Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.