Working Directory

  • Thread starter Thread starter Gary Nastrasio
  • Start date Start date
G

Gary Nastrasio

I'm using the OpenFileDialog class in my application and this changes my
current working directory (cwd) when a user selects a file to open.
Using MC++, how can I store my cwd into a String and then restore it
after the call to OpenFileDialog?

Thanks,

Gary
 
I'm using the OpenFileDialog class in my application and this changes my
current working directory (cwd) when a user selects a file to open.
Using MC++, how can I store my cwd into a String and then restore it
after the call to OpenFileDialog?

Gary,

Try setting the OFN_NOCHANGEDIR flag instead.

Dave
 
Hi Gary!
I'm using the OpenFileDialog class in my application and this changes my
current working directory (cwd) when a user selects a file to open.
Using MC++, how can I store my cwd into a String and then restore it
after the call to OpenFileDialog?

Why so complicated?
Just set the "RestoreDirectory" property of the "OpenFileDialog" to "true"!

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 
Back
Top