Working Directory

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
 
D

David Lowndes

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
 
J

Jochen Kalmbach [MVP]

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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top