Thanks for the info. I learned C pretty much formally, but taught myself C++ on the job. There are some gaps in my education.

One thing, I wasn't talking about making a copy of IniPath, just a copy of one of the CStrings in it that was already set with data.

For example,

m_CfgData.PinNamePath is set with data when the INI is read. Then later when that path is used, I do this:

CString filename = pFrame->m_CfgData.PinNamePath;

When the m_CfgData structure is filled within the MainFrame, the above setting of filename results in a NULL string, even though I can look at the string in m_CfgData.PinNamePath and it looks correct.

When I move the code to load data into m_CfgData to the app class, or the document class, setting filename works properly with no problems.

My conclusion is there is something odd about putting this sort of thing in the main frame because it works as expected everywhere else.

I will add the initialization code as you suggest just to be proper and to make sure everything starts in a known state.

Bill