OnFIleOpen Current Directory
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
I have a SDI and I dont override the standard file open ( i.e CWinApp::OnFileOpen() ), I do however use a separate CFileDialog to open a particular type of file. When I use the CFileDialog to open my files I set the initial directory to open from (different from the executable dir). Then when I use File->Open it uses the CWinApp::OnFileOpen and the initial directory is the last directory from my CFileDialog, I expect this. However I used SetCurrentDirectory to reset this directory but it still uses the previous value. It also uses this value when I retart the program and choose file->open. How can I set this to always open in the executable directory for file->open. I dont want to override the OnFileOpen and use a CFileDialog. ---