Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 967
  • Last Modified:

visual c++ file browser

Dear all,

   Do you know how to write a simple file browser using Visual C++?Thanks!
0
hpchong7
Asked:
hpchong7
1 Solution
 
hide_inCommented:
if you use MFC, you can use CFileDialog. if using SDK,
you can you GetOpenFileName() API,but it's more complex tan using CFileDialog
0
 
ValiHCommented:
 Here is a pice of code you can use. I have tried to keep it as simple as posible so if you want something more, plese let me now. Also let me now if it does (does not) work.

CString pathname;

  CFileDialog f_browser(true,NULL,NULL);
   if (f_browser.DoModal()==IDOK)
     {
         pathname=f_browser.GetPathName();
     }
     

0
 
hpchong7Author Commented:
Dear ValiH,

   I still have no time to try it.But I trust you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now