At close Program do the following
1) get the contents of the edit box by using SetWindowText (or through DDX)
2) save the contents in the registry (or an INI file)

At startup, do the following
1) read the registry (or INI file) for the previous edit box content.
2) use SetWindowText to setup the edit box (OnInitDialog), alternately, you can use DDX through the ClassWizard.

-Safai