• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 965
  • 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

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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