Select file in a windows explorer box

Sep 2, 2014 at 11:11am
I am making a program in which the user needs to select a file. I have seen a lots of programs that has a browse button, and a windows explorer window appears. It will be used to select a file, and return the file path as a string. How can i do this?
Sep 2, 2014 at 11:20am
Use the Common Dialog API. For your reference:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb776913%28v=vs.85%29.aspx

The code example on that page shows how to show the Open dialog and get the results.
Sep 3, 2014 at 8:58am
Most simple way is tio just use legacy GetOpenFileName() API:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646927(v=vs.85).aspx
Sep 4, 2014 at 5:03pm
Thanks!
Topic archived. No new replies allowed.