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. SHBrowseForFolder() API pb

SHBrowseForFolder() API pb

Scheduled Pinned Locked Moved C / C++ / MFC
jsontutorialquestion
7 Posts 3 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.
  • S Offline
    S Offline
    super_ttd
    wrote on last edited by
    #1

    i use the SHBrowseForFolder() API to prompt the user to select a folder. but i can't open the dialog in a particuliar folder. how to do that please ?

    -- TTD --

    J D 2 Replies Last reply
    0
    • S super_ttd

      i use the SHBrowseForFolder() API to prompt the user to select a folder. but i can't open the dialog in a particuliar folder. how to do that please ?

      -- TTD --

      J Offline
      J Offline
      James R Twine
      wrote on last edited by
      #2

      The pidlRoot parameter of the BROWSEINFO structure is used for that.    Do a search for that member and you will find ways to manage the ITEMIDLIST required for the structure.    Peace!

      -=- James


      If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
      Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
      DeleteFXPFiles & CheckFavorites (Please rate this post!)

      S 1 Reply Last reply
      0
      • J James R Twine

        The pidlRoot parameter of the BROWSEINFO structure is used for that.    Do a search for that member and you will find ways to manage the ITEMIDLIST required for the structure.    Peace!

        -=- James


        If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
        Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
        DeleteFXPFiles & CheckFavorites (Please rate this post!)

        S Offline
        S Offline
        super_ttd
        wrote on last edited by
        #3

        yes, i know that james, sorry for not having pointed out my tries. actually, i called CoInitialise(NULL) first, and i tried to use SHParseDisplayName() to create a PCIDLIST_ABSOLUTE to give to the pidlRoot attribute of the structure, in vain

        -- TTD --

        1 Reply Last reply
        0
        • S super_ttd

          i use the SHBrowseForFolder() API to prompt the user to select a folder. but i can't open the dialog in a particuliar folder. how to do that please ?

          -- TTD --

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          super_ttd wrote:

          but i can't open the dialog in a particuliar folder. how to do that please ?

          Have you supplied a callback function? That is where you establish the default folder.


          "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

          "Judge not by the eye but by the heart." - Native American Proverb

          S 1 Reply Last reply
          0
          • D David Crow

            super_ttd wrote:

            but i can't open the dialog in a particuliar folder. how to do that please ?

            Have you supplied a callback function? That is where you establish the default folder.


            "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

            "Judge not by the eye but by the heart." - Native American Proverb

            S Offline
            S Offline
            super_ttd
            wrote on last edited by
            #5

            DavidCrow wrote:

            Have you supplied a callback function?

            hu, no ! i thought callbacks were only to extend the dialog style/events management... Sir, can i ask you please to show me how you write such a function ? thank you very much for your answer

            D 1 Reply Last reply
            0
            • S super_ttd

              DavidCrow wrote:

              Have you supplied a callback function?

              hu, no ! i thought callbacks were only to extend the dialog style/events management... Sir, can i ask you please to show me how you write such a function ? thank you very much for your answer

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              super_ttd wrote:

              hu, no ! i thought callbacks were only to extend the dialog style/events management...

              You can use it for whatever you need.

              super_ttd wrote:

              Sir, can i ask you please to show me how you write such a function ?

              I could, but Googling for examples would prove a much more useful exercise.


              "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

              "Judge not by the eye but by the heart." - Native American Proverb

              S 1 Reply Last reply
              0
              • D David Crow

                super_ttd wrote:

                hu, no ! i thought callbacks were only to extend the dialog style/events management...

                You can use it for whatever you need.

                super_ttd wrote:

                Sir, can i ask you please to show me how you write such a function ?

                I could, but Googling for examples would prove a much more useful exercise.


                "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

                "Judge not by the eye but by the heart." - Native American Proverb

                S Offline
                S Offline
                super_ttd
                wrote on last edited by
                #7

                ok, thanks anyway

                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