|
-
May 23rd, 1999, 09:05 PM
#1
CFileDialog changes the current directory - Help
Hello-
I am having a problem that goes like this: I have a dialog based application, and writes .txt files occasionally for user preferences, data files, etc.. But to acquire some of that data I use the CFileDialog for browsing to a file. Well every time that I browse to a file, the save fails because the directory structure isn't the same. It's as if it's changing the current directory that my thread is pointing to.
Can anyone suggest a fix for this? I've tried writing the directory to the .INI file at Install time, and then doing a SetCurrentDirectory (win32 function) with the information from the .INI file, but that doesn't always work either.
Thanks in advance for any help you can provide.
- Troy
-
May 24th, 1999, 08:33 AM
#2
Re: CFileDialog changes the current directory - Help
Before displaying the CFileDialog, get the current directory by calling ::GetCurrentDirectory. Then after the CFileDialog is dismissed, reset the current directory back by calling ::SetCurrentDirectory.
-
May 24th, 1999, 08:45 AM
#3
Re: CFileDialog changes the current directory - Help
Always use full path for the files you are using
Sally
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
|