Click here to Skip to main content
12,302,287 members (48,711 online)
Rate this:
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 12-Sep-12 6:53am
Beat me.
Malli_S 12-Sep-12 6:55am
Oops ! You beat me in adding 'SHBrowseForFolder'. :D
Jochen Arndt 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 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160530.1 | Last Updated 12 Sep 2012
Copyright © CodeProject, 1999-2016
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