how to implement a "folder browser" in VC++6.0?

Hi,
I'm new to VC++6.0.
Now I'm doing a project. Users are required to enter the a folder path in a
dialogue or they can select a folder after clicking a "browse..." button.
I know how to use CFileDialog to open a file. But I just dont know how to
implement this "folder browser".
Is there any simple way just like CFileDialog?
Your reply will be greatly appreciated!!!!!

--blueplum


0
zhangj (1)
11/4/2003 2:55:14 AM
vc.mfc 33608 articles. 0 followers. Follow

4 Replies
673 Views

Similar Articles

[PageSpeed] 0

SHBrowseForFolder(), #include shlobj.h and shell32.lib to the linker inputs.

"Jing Zhang" <zhangj@cis.uab.edu> wrote in message
news:O4NzE8noDHA.1884@TK2MSFTNGP09.phx.gbl...
> Hi,
> I'm new to VC++6.0.
> Now I'm doing a project. Users are required to enter the a folder path in
a
> dialogue or they can select a folder after clicking a "browse..." button.
> I know how to use CFileDialog to open a file. But I just dont know how to
> implement this "folder browser".
> Is there any simple way just like CFileDialog?
> Your reply will be greatly appreciated!!!!!
>
> --blueplum
>
>


0
mairdanot (111)
11/4/2003 3:16:15 AM
hi try the following  snippet code

BROWSEINFO binfo;
 char szFolder[MAX_PATH];
 CString csCaption;
 csCaption="Select Destination folder ";

 memset(&binfo,0,sizeof(binfo));

 binfo.hwndOwner=m_hWnd;
 binfo.pszDisplayName=szFolder;
 binfo.lpszTitle=csCaption;
 binfo.ulFlags=BIF_RETURNONLYFSDIRS;

 LPITEMIDLIST pidl=SHBrowseForFolder (&binfo);
 int iRet=SHGetPathFromIDList(pidl,szFolder);

hope this will help you better


Jibesh.


-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com


"David A. Mair" <mairdanot@hotrmail.com> wrote in message
news:OZqNDIooDHA.2216@TK2MSFTNGP12.phx.gbl...
> SHBrowseForFolder(), #include shlobj.h and shell32.lib to the linker
inputs.
>
> "Jing Zhang" <zhangj@cis.uab.edu> wrote in message
> news:O4NzE8noDHA.1884@TK2MSFTNGP09.phx.gbl...
> > Hi,
> > I'm new to VC++6.0.
> > Now I'm doing a project. Users are required to enter the a folder path
in
> a
> > dialogue or they can select a folder after clicking a "browse..."
button.
> > I know how to use CFileDialog to open a file. But I just dont know how
to
> > implement this "folder browser".
> > Is there any simple way just like CFileDialog?
> > Your reply will be greatly appreciated!!!!!
> >
> > --blueplum
> >
> >
>
>


0
jibesh.vp (92)
11/4/2003 7:34:17 AM
It really helps. Thank you very much!
Now I have another problem. I want to display the current selected folder
path in the browse dialog. How should I do? Use a callback function? I don't
know how to use a callback function correctly. Can you show me some sample
code?
Thanks a lot!!

--blueplum

"jibesh" <jibesh.vp@m2comsys.com> wrote in message
news:%23%233h4WqoDHA.3320@tk2msftngp13.phx.gbl...
> hi try the following  snippet code
>
> BROWSEINFO binfo;
>  char szFolder[MAX_PATH];
>  CString csCaption;
>  csCaption="Select Destination folder ";
>
>  memset(&binfo,0,sizeof(binfo));
>
>  binfo.hwndOwner=m_hWnd;
>  binfo.pszDisplayName=szFolder;
>  binfo.lpszTitle=csCaption;
>  binfo.ulFlags=BIF_RETURNONLYFSDIRS;
>
>  LPITEMIDLIST pidl=SHBrowseForFolder (&binfo);
>  int iRet=SHGetPathFromIDList(pidl,szFolder);
>
> hope this will help you better
>
>
> Jibesh.
>
>
> -------------------------------------------------------------------------
> FIGHT BACK AGAINST SPAM!
> Download Spam Inspector, the Award Winning Anti-Spam Filter
> http://mail.giantcompany.com
>
>
> "David A. Mair" <mairdanot@hotrmail.com> wrote in message
> news:OZqNDIooDHA.2216@TK2MSFTNGP12.phx.gbl...
> > SHBrowseForFolder(), #include shlobj.h and shell32.lib to the linker
> inputs.
> >
> > "Jing Zhang" <zhangj@cis.uab.edu> wrote in message
> > news:O4NzE8noDHA.1884@TK2MSFTNGP09.phx.gbl...
> > > Hi,
> > > I'm new to VC++6.0.
> > > Now I'm doing a project. Users are required to enter the a folder path
> in
> > a
> > > dialogue or they can select a folder after clicking a "browse..."
> button.
> > > I know how to use CFileDialog to open a file. But I just dont know how
> to
> > > implement this "folder browser".
> > > Is there any simple way just like CFileDialog?
> > > Your reply will be greatly appreciated!!!!!
> > >
> > > --blueplum
> > >
> > >
> >
> >
>
>


0
11/4/2003 4:52:05 PM
Take a look at the following KB article

        HOWTO: Browse for Folders from the Current Directory
        http://support.microsoft.com/default.aspx?scid=kb;en-us;Q179378

-- 
Cheers
Check Abdoul [VC++ MVP]
-----------------------------------

"Dolphin Mark" <dolphinmfc@yahoo.com> wrote in message
news:uMVqwPvoDHA.2268@TK2MSFTNGP12.phx.gbl...
> It really helps. Thank you very much!
> Now I have another problem. I want to display the current selected folder
> path in the browse dialog. How should I do? Use a callback function? I
don't
> know how to use a callback function correctly. Can you show me some sample
> code?
> Thanks a lot!!
>
> --blueplum
>
> "jibesh" <jibesh.vp@m2comsys.com> wrote in message
> news:%23%233h4WqoDHA.3320@tk2msftngp13.phx.gbl...
> > hi try the following  snippet code
> >
> > BROWSEINFO binfo;
> >  char szFolder[MAX_PATH];
> >  CString csCaption;
> >  csCaption="Select Destination folder ";
> >
> >  memset(&binfo,0,sizeof(binfo));
> >
> >  binfo.hwndOwner=m_hWnd;
> >  binfo.pszDisplayName=szFolder;
> >  binfo.lpszTitle=csCaption;
> >  binfo.ulFlags=BIF_RETURNONLYFSDIRS;
> >
> >  LPITEMIDLIST pidl=SHBrowseForFolder (&binfo);
> >  int iRet=SHGetPathFromIDList(pidl,szFolder);
> >
> > hope this will help you better
> >
> >
> > Jibesh.
> >
> >
>
> -------------------------------------------------------------------------
> > FIGHT BACK AGAINST SPAM!
> > Download Spam Inspector, the Award Winning Anti-Spam Filter
> > http://mail.giantcompany.com
> >
> >
> > "David A. Mair" <mairdanot@hotrmail.com> wrote in message
> > news:OZqNDIooDHA.2216@TK2MSFTNGP12.phx.gbl...
> > > SHBrowseForFolder(), #include shlobj.h and shell32.lib to the linker
> > inputs.
> > >
> > > "Jing Zhang" <zhangj@cis.uab.edu> wrote in message
> > > news:O4NzE8noDHA.1884@TK2MSFTNGP09.phx.gbl...
> > > > Hi,
> > > > I'm new to VC++6.0.
> > > > Now I'm doing a project. Users are required to enter the a folder
path
> > in
> > > a
> > > > dialogue or they can select a folder after clicking a "browse..."
> > button.
> > > > I know how to use CFileDialog to open a file. But I just dont know
how
> > to
> > > > implement this "folder browser".
> > > > Is there any simple way just like CFileDialog?
> > > > Your reply will be greatly appreciated!!!!!
> > > >
> > > > --blueplum
> > > >
> > > >
> > >
> > >
> >
> >
>
>


0
CheckAbdoul
11/4/2003 5:46:28 PM
Reply:

Similar Artilces:

how to implement a "folder browser" in VC++6.0?
Hi, I'm new to VC++6.0. Now I'm doing a project. Users are required to enter the a folder path in a dialogue or they can select a folder after clicking a "browse..." button. I know how to use CFileDialog to open a file. But I just dont know how to implement this "folder browser". Is there any simple way just like CFileDialog? Your reply will be greatly appreciated!!!!! --blueplum SHBrowseForFolder(), #include shlobj.h and shell32.lib to the linker inputs. "Jing Zhang" <zhangj@cis.uab.edu> wrote in message news:O4NzE8noDHA.1884@TK2MSFTNGP09.phx.g...

.NET File/Folder Browser that is similar to the windows explorer
Hello, i need a .NET WinForms control that can be used to explore the local file system just the same way Windows Explorer does. I only need the tree view part of it (which usually is the left frame of the windows explorer). That tree view is supposed not only to show folders but files as well. That control also should be able to filter files by a certain pattern (e.g. only display *.txt files). I found http://www.codeproject.com/KB/miscctrl/FileBrowser.aspx but that control has too many bugs and my schedule is too tight to fix it. I would be happy to find a commercial pro...