I have a dialog with an Edit box. Now I would like to save what ever I type in the box into a string variable´when I either push a button next to the edit box or when I simple hit enter.

Can anyone tell me how this is done?
I'm pretty new to mfc so please try to explain it in detail. Thanks