However, if you have SetRegistryKey() running, your app will start the app with the last setting save in the registry. This include Windows position & size etc.
However, you can delete the function couse you will have assert error. So how to do it?
By using Unregister(). SetRegistry() can be found in App::InitInstance(). See following.
BOOL CFEAApp::InitInstance() { //Other Code AfxEnableControlContainer(); SetRegistryKey(_T("aaa")); LoadStdProfileSettings(4); // Load standard INI file options (including MRU) //Just add the following unregister() after LoadStfProfileSetting() Unregister(); //Other Code return TRUE; }
No comments:
Post a Comment