Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,113 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,750 people online right now. Registration is fast and FREE... Join Now!




Device List

 
Reply to this topicStart new topic

Device List

complete
12 Apr, 2007 - 04:43 PM
Post #1

New D.I.C Head
*

Joined: 12 Apr, 2007
Posts: 22


My Contributions


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?

IPB Image


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 Computer" 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.


User is offlineProfile CardPM
+Quote Post

NickDMax
RE: Device List
12 Apr, 2007 - 11:34 PM
Post #2

2B||!2B
Group Icon

Joined: 18 Feb, 2007
Posts: 2,858



Thanked: 49 times
Dream Kudos: 550
My Contributions
Well I am not a powerhouse C++ GUI programmer but I can tell you that:

one way would be to create a namespace (not as in C++ namespace, but as an explorer namespace). I have never done this in C++, rather in VB using api calls (so it should be easier in C right? lets hope so). Here is where I gleened most of my information. There are a few other tutorials and there WAS some good information on the old MSDN platform SDK -- I am not sure how watered down the .NET version has gotten on this.

Once you have your own namespace extension you can use the standard open dialog box.

The other way would be to use the ListView and TreeView controls together.
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/1/08 09:45PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month