When I called CDocument::SetPathName with ‘eererr.hpr’ in Windows XP it updates the member variable m_strPathName with value 'C:\Program Files\ICEHost\Projects\eererr.hpr'
When I executed the same method in Windows 7 it updated m_strPathName with 'C:\Program Files\ICEHost\eererr.hpr' Projects directory is missing in this path
What is the reason for this difference in WinXp and Windows 7?
Based on what information does CDocument::SetPathName updates m_strPathName?
How can make the behavior same?
SetPathName()callsGetFullPathName()which “merges the name of the current drive and directory with a specified file name”. So the difference is probably on how the current directory is obtained.It is documented how CFileDialog selects a different initial directory on different OS (check
lpstrInitialDirin the followinglink). Maybe it has to do with that.