Click here to Skip to main content
11,579,360 members (69,088 online)
Rate this: bad
good
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
Gbenbam1.1K
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Check this[^], there's a sample code also.

You can even use SHBrowseForFolder[^].
  Permalink  
v3
Comments
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
good
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[^].
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 183
1 Frankie-C 115
2 Afzaal Ahmad Zeeshan 85
3 Richard Deeming 60
4 Suvendu Shekhar Giri 60
0 OriginalGriff 933
1 Sergey Alexandrovich Kryukov 740
2 Abhinav S 573
3 F-ES Sitecore 420
4 Dave Kreskowiak 419


Advertise | Privacy | Mobile
Web03 | 2.8.150603.1 | Last Updated 12 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100