Wouldn't the class wizard do that for you?

There's some function called DDX_Text, it reads from a editbox to a CString object...