C++ Code wanted for Device List

Discussion in 'Web Design & Coding' started by Complete, Apr 13, 2007.

  1. Complete

    Complete OSNN Addict

    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?

    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.
    #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.
  2. LordOfLA

    LordOfLA Godlike!

    Maidenhead, Berkshire, UK
    thats a built in API function. Provided by the common controls ocx/dll.

    I forget the function name though. The API docs should tell you though if you look up common controls.
  3. Complete

    Complete OSNN Addict


    Super. Like, SetMyComputerMode or something? I wonder there I could dig that up.

    The control I have pictured here is made only after I click on the "My Computer" icon on the left side of the dialog box.

    I am able to bring up the Open File Dialog class with the directory pointing to where the system gets this data from the hard drive (the users area) but the display does not look as it should or as I want it to. Instead, it displays a set of folders for Documets and other things.

    And I like your avatar better than mine, by the way.