Prev: How can I assign a size to a What's This popup help window?
Next: Server Busy message during printing from Excel after Off. 2003 SP2
From: ab` on 2 Jun 2010 00:58 just want my CFileDialog to start where I tell it, everytime...
From: Mihai N. on 2 Jun 2010 01:47 > just want my CFileDialog to start where I tell it, everytime... But are you telling it where you want? How? You have to specify lpstrInitialDir in the m_ofn member. There is some interaction with lpstrFile, read the lpstrInitialDir description at http://msdn.microsoft.com/en-us/library/ms646839%28VS.85%29.aspx -- Mihai Nita [Microsoft MVP, Visual C++] http://www.mihai-nita.net ------------------------------------------ Replace _year_ with _ to get the real email
From: ab` on 2 Jun 2010 01:51 Yes, it seems useless in Windows 7. On 6/1/2010 10:47 PM, Mihai N. wrote: > >> just want my CFileDialog to start where I tell it, everytime... > > But are you telling it where you want? How? > > You have to specify lpstrInitialDir in the m_ofn member. > There is some interaction with lpstrFile, read the lpstrInitialDir > description at > http://msdn.microsoft.com/en-us/library/ms646839%28VS.85%29.aspx > >
From: Goran on 2 Jun 2010 03:07 On Jun 2, 6:58 am, ab` <a...(a)absent.com> wrote: > just want my CFileDialog to start where I tell it, everytime... That's related to your "working directory", not MRU. When your user opens a file somewhere, working directory changes to there. Most likely you have a bug in your code and you are not setting m_ofn.lpstrInitialDir correctly. Do you have your code working as expected in pre-7, but not in 7? Goran.
From: David Lowndes on 2 Jun 2010 03:24
>Yes, it seems useless in Windows 7. Probably due to this intentional behaviour: "1.If lpstrInitialDir has the same value as was passed the first time the application used an Open or Save As dialog box, the path most recently selected by the user is used as the initial directory." Generally I find this behaviour benificial, but I guess in some circumstances it won't be. I don't know if you can circumvent this behaviour by the hook facilities. Dave |