Common Dialog Boxes

This is a discussion on Common Dialog Boxes within the Windows Programming forums, part of the Platform Specific Boards category; I know there are functions that make common dialog boxes that let you have "Save", "Open", "Choose Font", "Choose Color", ...

  1. #1
    Registered User KonArtis's Avatar
    Join Date
    Mar 2003
    Posts
    34

    Common Dialog Boxes

    I know there are functions that make common dialog boxes that let you have "Save", "Open", "Choose Font", "Choose Color", etc. But is there one that allows the user to choose a directory (something like the attached picture)?

    Thanks
    Attached Images Attached Images  

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    SHBrowseForFolder.

    There's a couple of examples in this thread.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    ResurgentBarbecue UnclePunker's Avatar
    Join Date
    May 2002
    Posts
    128
    That is correct.

    You need to set up a structure of type BROWSEINFO to set up the dialog box. and set up a pointer to a structure of type ITEMIDLIST to get the return value of SHBrowseForFolder. You can then use a function called SHGetPathFromIDList, which takes your ITEMIDLIST structure as it's first parameter and a char array as it's second parameter. It will then copy the path inot your char array.
    Compiler == Visual C++ 6.0
    "Come Out Fighting."

  4. #4
    Registered User KonArtis's Avatar
    Join Date
    Mar 2003
    Posts
    34
    Thanks for the help!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Common Dialog boxes GetOpenFileName()
    By A10 in forum Windows Programming
    Replies: 3
    Last Post: 09-02-2008, 09:56 PM
  2. Dialog Boxes and Sliders
    By AtomRiot in forum Windows Programming
    Replies: 4
    Last Post: 01-29-2003, 08:36 AM
  3. Common Dialog Boxes problem
    By face_master in forum Windows Programming
    Replies: 6
    Last Post: 07-29-2002, 06:01 AM
  4. Dialog Boxes
    By cerion in forum Windows Programming
    Replies: 4
    Last Post: 06-10-2002, 07:54 PM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 10:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21