Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to Browse for a Directory?

How to Browse for a Directory?

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelptutorial
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jerry Wang 0
    wrote on last edited by
    #1

    Hi, I have a question that may be very very easy for most of you. Please don't laugh, I'm embarassed not able to find it after spending quite a bit of time on it. How can I call up a dialog box that browses for a directory? I know CFileDialog can browse for a file, but I do not need the file. I just want the directory. Thank you very much for your help. :-O

    M 1 Reply Last reply
    0
    • J Jerry Wang 0

      Hi, I have a question that may be very very easy for most of you. Please don't laugh, I'm embarassed not able to find it after spending quite a bit of time on it. How can I call up a dialog box that browses for a directory? I know CFileDialog can browse for a file, but I do not need the file. I just want the directory. Thank you very much for your help. :-O

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      Use SHFileOperation(). There are wrapper classes here on CP to help you get started if you need it. --Mike-- http://home.inreach.com/mdunn/ #include "witty_sig.h" :love: your :bob: with :vegemite: and :beer:

      PJ ArendsP 1 Reply Last reply
      0
      • M Michael Dunn

        Use SHFileOperation(). There are wrapper classes here on CP to help you get started if you need it. --Mike-- http://home.inreach.com/mdunn/ #include "witty_sig.h" :love: your :bob: with :vegemite: and :beer:

        PJ ArendsP Offline
        PJ ArendsP Offline
        PJ Arends
        wrote on last edited by
        #3

        SHBrowseForFolder() works better IMHO --- It may be that your sole purpose in life is simply to serve as a warning to others.

        Within you lies the power for good; Use it!

        M 1 Reply Last reply
        0
        • PJ ArendsP PJ Arends

          SHBrowseForFolder() works better IMHO --- It may be that your sole purpose in life is simply to serve as a warning to others.

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          Heh, my bad. I got the SH functions mixed up in my brain. ;P --Mike-- http://home.inreach.com/mdunn/ #include "witty_sig.h" :love: your :bob: with :vegemite: and :beer:

          M 1 Reply Last reply
          0
          • M Michael Dunn

            Heh, my bad. I got the SH functions mixed up in my brain. ;P --Mike-- http://home.inreach.com/mdunn/ #include "witty_sig.h" :love: your :bob: with :vegemite: and :beer:

            M Offline
            M Offline
            Mark Terrano
            wrote on last edited by
            #5

            I'll ride on this topic with mine...on the off chance the original poster is using WinXP :) http://www.codeproject.com/script/comments/forums.asp?forumid=1647&select=80917&fr=176&df=2&app=50#xx79842xx :confused: --Mark Terrano

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups