How to invoke "Browse for folder" dialog from MFC

Hello and thank you for trying to help.

I would like to invoke the "Browse for folder" dialog that asks a user to
browse for just a directory, not files like CFileDialog.  It has a tree
control loaded with the file hierarchy, an OK and a Cancel button, that's
it.

Does anyone know how to invoke it??

Thanks,

Ivan


0
ivan (57)
10/30/2003 9:39:10 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
451 Views

Similar Articles

[PageSpeed] 38

SHBrowseForFolder

"Ivan Starr" <ivan@ivanstarr.com> wrote in message
news:eIm4Z0ynDHA.2272@tk2msftngp13.phx.gbl...
> Hello and thank you for trying to help.
>
> I would like to invoke the "Browse for folder" dialog that asks a user to
> browse for just a directory, not files like CFileDialog.  It has a tree
> control loaded with the file hierarchy, an OK and a Cancel button, that's
> it.
>
> Does anyone know how to invoke it??
>
> Thanks,
>
> Ivan
>
>


0
tbalcom1 (29)
10/30/2003 9:34:35 PM
Reply:

Similar Artilces:

Browse for Folder (and set default folder)
I am using this code to browse for a folder (just folders no files) in Access 2007. It works great, I just want one extra feature: - to supply a starting folder I found one example on stephen lebans site http://www.lebans.com/callbackbrowser.htm but it required the code to exist in the code behind the form. I use this on about 10 forms so would prefer something that I could place in just one module. Does anyone have a better solution? Thanks in advance, Mark -------------------------------- Option Compare Database Option Explicit Private Type BROWSEINFO hOwner As Lo...

How to get a Browse for Folder Dialog??
I would like to display a dialog for the user to select a folder rather than a file (as in CFileDialog). Is there a simple way to do this? Thanks in advance. Bob Bob Curry wrote: > I would like to display a dialog for the user to select a folder rather than > a file (as in CFileDialog). Is there a simple way to do this? You are looking for BrowseForFolder. Check MSDN Regards, Danny Try this TCHAR szFilters[]=_T("MyFile (*.dat)|*.dat|All Files(*.*)|*.*||"); CFileDialog m_ldFile(TRUE,_T ("dat"),_T("*.dat"),OFN_FILEMUSTEXIST,szFilters); m_ldFil...

browse for folder code
I am using this code to browse for a folder (just folders no files) in Access 2007. It works great, I just want one extra feature: - to supply a starting folder I found one example on stephen lebans site http://www.lebans.com/callbackbrowser.htm but it required the code to exist in the code behind the form. I use this on about 10 forms so would prefer something that I could place in just one module. Does anyone have a better solution? Thanks in advance, Mark -------------------------------- Option Compare Database Option Explicit Private Type BROWSEINFO hOwner As Long...

Browse for folder 03-08-08
I want to use the Browse for folder but I would like it to start in a specified folder. Whenever I use it it starts in the root folder. Alec Alec, If you are using the api from the access web called api 0001, then the following will allow you to tell the dialog where to open When you call this function in your code, use the code below. ' Now actually call to get the file name. varFileName = ahtCommonFileOpenSave( _ OpenFile:=True, _ InitialDir:=varDirectory, _ Filter:=strFilter, _ Flags:=lngFlags, ...

Browse for Folder
I have the API working from (http://www.mvps.org/access/api/api0002.htm). Can I make the Browse for folder dialog start at a particular folder or unc path such as \\prt02\projects\? TIA Hi, Here is the module code I wrote to do what you looking for... 'Begin ************************ Option Explicit Option Private Module Private Const BIF_STATUSTEXT As Long = &H4& Private Const BIF_RETURNONLYFSDIRS As Long = 1 Private Const BIF_DONTGOBELOWDOMAIN As Long = 2 Private Const MAX_PATH ...

Browse for Folder 02-04-08
From Lebans.com I downloaded the A2KCallBackBrowser code (http:// www.lebans.com/toc.htm). There are two dialog forms in the example. You can browse for folder in one form. In the other form you can browse for file. The browse for file also opens the browse window at the cursor location. I would like to do the same (open at cursor location) for the browse for folder window. How can I modify this code to to that? ...

How to invoke "Browse for folder" dialog from MFC
Hello and thank you for trying to help. I would like to invoke the "Browse for folder" dialog that asks a user to browse for just a directory, not files like CFileDialog. It has a tree control loaded with the file hierarchy, an OK and a Cancel button, that's it. Does anyone know how to invoke it?? Thanks, Ivan SHBrowseForFolder "Ivan Starr" <ivan@ivanstarr.com> wrote in message news:eIm4Z0ynDHA.2272@tk2msftngp13.phx.gbl... > Hello and thank you for trying to help. > > I would like to invoke the "Browse for folder" dialog that asks a use...

Creating a Browse for Folder
I have seen programs where there is an edit field for defining the location of a file and then to the right of the field is a button with 3 periods on it which when clicked brings up a browse for folder file box where the user can choose a directory and file and then it is populated in the edit field. Is there a custom control to use for this or do I have to develop this myself? Take a look at SHBrowseForFolder and CFileDialog. You probably want CFileDialog. -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "William Gower" <w_gower@hotmail.com> wrote in message news:Olf0wrmk...

Browse for Folders Dialog
Hi all! I have started creating my first ever MFC application, and although I can use DoModal() to open a 'Browse for Files' dialog, I can't seem to filter it so that I can select a folder instead of a file withing that folder. Is there any Windows-specific way I can do this without having to use a separate class? If not, would anyone know if Boost supports this? Thanks in advance. Daz Take a look at SHBrowseForFolder: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shbrowseforfolder.asp ---- Ajay Ajay Kalra wrot...

What does the "browse for folder" mean? When installing the Offic.
I am installing my Mircrosoft Office Home and Student 2007. Then in the middle of the installation progress the "browse for folder'' pops up and is asking for me to browse for a valid installation source..." but what folder does it want??? I try to choose one of the folders and when I choose it is tell me that is an invalid source. "Natalie" <Natalie@discussions.microsoft.com> wrote in message news:41BC7C63-EFAD-44B8-99D5-3840E612B467@microsoft.com... > I am installing my Mircrosoft Office Home and Student 2007. Then in the > middle of t...

Browse for folder
Hi All, How to call "Browse for folder" dialog form.And then return the selected foder path as string on cell A4. Thank's rgds, shiro Sorry if this is a repost. I can't see my last 2 posts on another newsgroup. ...