|
-
Feb 14th, 2003, 03:43 AM
#1
Thread Starter
Addicted Member
CFileDialog changes the current directory..argh!
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|