What I am looking to do is to provide the user (who runs my program) with a list of devices that they can pick from. You can do this with an Open File dialog if you click on "My Computer". What I want to know is how I can set up the dialog before the user opens it to prsent this list. How would you do this in C++? Have you seen it done before?

[IMG]http://i67.photobucket.com/albums/h292/Athono/_help.png[/IMG]


I want one of two (or both) solutions.

#1) I already have a custom File Open dialog program written where I am able to make sure that the user selects a directory and is not allowed to input a filename. Now I just want to know how to set up this estantiated FileOpen class so that it will first come up with the "My Dialog" area showing.

OR

#2) I want to create a drop-down menu that only shows the devices for the user to pick from. In other words, just the C drive, the D drive, etc.

See the OPENFILENAME structure and GetOpenFileName() function They already have the options you want.

And here is a drive picker MFC class. Download the source code for this project and it will show you how to get the list of drive letters that are available on the computer.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.