Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C++Windows
Please I need a native routine with which I can get the address of a directory from the User.
GetOpenFileName Function lunches a dialogue box that give users an access to the computer's directory sotha t ther can choose a file.
I need something like that with which users can choos a directory istead.
I need it so that users can specify the directory they want my application to copy.
Posted 12-Sep-12 0:39am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Check this[^], there's a sample code also.
You can even use SHBrowseForFolder[^].
Jochen Arndt at 12-Sep-12 6:53am
Beat me.
Malli_S at 12-Sep-12 6:55am
Oops ! You beat me in adding 'SHBrowseForFolder'. :D
Jochen Arndt at 12-Sep-12 7:00am
? Your post is 2 minutes older and the first link is the same as mine. Your edited link is for Windows CE.
Malli_S at 12-Sep-12 7:07am
Hey, thanks for identifying the link, I copied wrong link from open windows. :)
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

You can use SHBrowseForFolder[^].
A ready to use implementation can be found in the article FolderBrowser[^].

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
0 Sergey Alexandrovich Kryukov 477
1 sanket saxena 355
2 thatraja 240
3 Abhinav S 216
4 CPallini 215
0 Sergey Alexandrovich Kryukov 8,784
1 OriginalGriff 5,025
2 Peter Leow 3,839
3 Maciej Los 3,535
4 Er. Puneet Goel 3,107

Advertise | Privacy | Mobile
Web04 | 2.8.140415.2 | Last Updated 12 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid