ARG! m_pszProfileName
-
m_pszProfileName is set by MFC's APPINIT.CPP to the filename by which the application was invoked. If the application was started via a short path name (using GetShortPathName), such as must be fairly common when passing the filename on command lines, the application will use the incorrect registry key. I use SetRegistryKey in my app's OnInitInstance and nothing else. So now I've got buggy programs. Should I have done something else? oh.. wait. I just looked. Right, I'm missing AFX_IDS_APP_TITLE in the string table which MFC uses to reset m_pszAppName to the correct application name--- which in turn causes pszProfileName to get later get set correctly. ARG, I those hidden chains of effects drive me crazy. Oh well. I guess I'll still hit submit on this.... :wtf: