Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

visual c++ file browser

Posted on 2001-09-04
3
Medium Priority
?
957 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

660 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