Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

visual c++ file browser

Posted on 2001-09-04
3
Medium Priority
?
961 Views
Last Modified: 2008-03-04
Dear all,

   Do you know how to write a simple file browser using Visual C++?Thanks!
0
Comment
Question by:hpchong7
3 Comments
 
LVL 1

Expert Comment

by:hide_in
ID: 6452555
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
 

Accepted Solution

by:
ValiH earned 120 total points
ID: 6460036
 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
 
LVL 2

Author Comment

by:hpchong7
ID: 6472983
Dear ValiH,

   I still have no time to try it.But I trust you.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question