Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CFileDialog for path only selection?

19 views
Skip to first unread message

Sean

unread,
Mar 8, 2004, 3:47:06 PM3/8/04
to
I have a little dialog-based control application I'm attempting to
write. I need to let the user select a path where any number of files
will be created while the application is in use.

What I was wanting to do was have an edit box where they could either
manually type in a path or push a button and use a file dialog-like
window to select a path, and then have a separate edit box where
they'd enter the actual file name they want to store the data in.

I was just wondering if there was a way to use CFileDialog to just
return a path not associated with any particular file, and then return
it to fill in the "path" edit box? I wasn't sure if that was
possible.

I might change the app so that it just opens a temporary file at
start-up and then the user pushes something to choose to save it after
all the data is collected and then just use the CFileDialog in the
normal way and open a second temporary file if they wish to collect
another run of data, but I'd be interesting in knowing if what I want
to do in the first case is possible or not anyway, just out of
curiosity.

CheckAbdoul

unread,
Mar 8, 2004, 3:51:38 PM3/8/04
to
Take a look at the SHBrowseForFolder() API.

--
Cheers
Check Abdoul [VC++ MVP]
-----------------------------------

"Sean" <creo...@yahoo.com> wrote in message
news:b97bab2f.04030...@posting.google.com...

Chris Taylor

unread,
Mar 8, 2004, 4:02:30 PM3/8/04
to
Hi,

You might want to take a look at SHBrowseForFolder. I have not used this
stuff for years, but as I recall PJ Naughter had a decent wrapper for this.

http://www.naughter.com/ddxgetfolder.html

Hope this helps

--
Chris Taylor
http://dotnetjunkies.com/WebLog/chris.taylor/


"Sean" <creo...@yahoo.com> wrote in message
news:b97bab2f.04030...@posting.google.com...

Alec S.

unread,
Mar 8, 2004, 10:33:48 PM3/8/04
to
That other responses are correct, but if you do not want to deal with
the API itself, you can just get an easy wrapper class like CFolderDialog.
Just do an Internet search for that and you'll get one in no time (first 2
hits).


--
Alec S.
alec @ synetech . cjb . net


e


"Sean" <creo...@yahoo.com> wrote in message
news:b97bab2f.04030...@posting.google.com...

0 new messages