Folder selection menu using Common Dialog Box?

This is a discussion on Folder selection menu using Common Dialog Box? within the Windows Programming forums, part of the Platform Specific Boards category; Does anyone know how can I open a folder selection menu common dialog box? Something similar to GetOpenFileName , but ...

  1. #1
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768

    Folder selection menu using Common Dialog Box?

    Does anyone know how can I open a folder selection menu common dialog box?
    Something similar to GetOpenFileName, but with a folder instead of file


    Thank you.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    Thank you, but just one last thing.
    After used once, is there a way to make this dialog display the last selected folder?

    Thanks again.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  4. #4
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544

  5. #5
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    I've already seen this example, but it either not working or I'm simply missing something.
    The only difference between this example and my code are the following two lines:
    Code:
    bi.lpfn        = BrowseCallbackProc;
    bi.lParam      = (LPARAM) szCurrent;
    I've tried to add the lParam value, but it gave me no effect.
    As for the lpfn, I'm not sure I need it.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  6. #6
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    How else are you going to make the folder selection without the BrowseCallbackProc setting it with a BFFM_SETSELECTION message?
    Quote Originally Posted by msdn, BrowseCallbackProc
    BFFM_SETSELECTION

    Specifies the path of a folder to select. The path can be specified as a string or a PIDL.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  7. #7
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    Not a very elegant solution...
    Does anyone know the reason for this weird design??
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Set Printer Prior To Loading Print Dialog Box
    By Beaner in forum Windows Programming
    Replies: 3
    Last Post: 10-10-2008, 02:02 PM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 02:01 AM
  3. Making dialog box the only window
    By PJYelton in forum Windows Programming
    Replies: 2
    Last Post: 09-06-2005, 01:02 PM
  4. Menu Item Caption - /a for right aligned Accelerator?
    By JasonD in forum Windows Programming
    Replies: 6
    Last Post: 06-25-2003, 12:14 PM
  5. SDI Menu App - MSVC 6
    By Unregistered in forum Windows Programming
    Replies: 7
    Last Post: 10-16-2001, 10:59 PM

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