I want to set and recall registry keys. I want to recall them obviously when the program first starts up and then write the keys just before the window closes. How do I do this!!! The registry functions are included in CWinApp and I cannot call these functions in my CWnd class because I cannot declare a second CWinApp and get away with it. I created a dialog based MFC shared dll project. There is just one main dialog to my program and I want to be able to use the registry to store my windows position. Any suggestions?