I present a standard open dialog to the user. Once the user makes a file selection, the file is manipulated.

Later in the code, having NOTHING to do with the file\path that was retrieved from the dialog, I must create a "error.log" file where the application resides. Little did I know, but the path changed!!!

Example:

1) Program executed, current path = C:\Temp
2) Dialog selection made, current path CHANGED to F:\Directory
3) Call Open("error.log", mode::Create..etc). File created in F:\Directory\error.log

What can I do to prevent this? I tried calling the ::GetCurrentDirectory() in the dialog's constructor, but received a ASSERT. Also calling from OnInitDialog() fails.

Any suggestions?

Thanks
Phil