Hello, pretty green when it comes to C++ im more familiar with AS3 but I'm looking to start making windows programs, anyways I was looking for a way to display a directory within my program like depicted in this video. http://www.youtube.c...h?v=Yit9n2CMmhQ I want to be able to view all the files under a certain path like say my documents, Im curious if the TreeView would be the correct tool to use in this situation, and if so how would I go about linking it to a directory, and possibly if i were to share the program with my friends, how would it know to change certain aspects of the directory like if its C:\Users\Richard\Documents for me, could I get it to automatically change the "Richard" to whatever the name of their computer is? I've looked around on msdn reading up on the various tools I thought might be good to drag and drop onto my program to look, Directory Entry/Search dont make a box to actually view the folder on the application, and im just not sure at all how to go about solving this. Any help would be greatyly appreciated, thanks for the read.
4 Replies - 341 Views - Last Post: 16 January 2012 - 03:44 PM
#1
C++ Folder View in Visual Basic Forms Application
Posted 15 January 2012 - 05:38 PM
Replies To: C++ Folder View in Visual Basic Forms Application
#2
Re: C++ Folder View in Visual Basic Forms Application
Posted 15 January 2012 - 07:42 PM
Are you using the Visual Studio Form designer?
You can get User information from environment variables.
You can get User information from environment variables.
#3
Re: C++ Folder View in Visual Basic Forms Application
Posted 15 January 2012 - 07:52 PM
Why re-invent the wheel? I am sure C++ has a wrapper for the API SHBrowseForFolder.
#4
Re: C++ Folder View in Visual Basic Forms Application
Posted 16 January 2012 - 01:16 PM
Ok so I have a folderBrowswerDialog, but how would I display it in a listview component, like for a textbox, I was doing
textBox1->Text = folderBrowserDialog1->SelectedPath; but I dont want to view the path text, I want to view the contents of a folder, also kinda curious how I would specificy a path, would i put it in quotes like "C:\"?
textBox1->Text = folderBrowserDialog1->SelectedPath; but I dont want to view the path text, I want to view the contents of a folder, also kinda curious how I would specificy a path, would i put it in quotes like "C:\"?
#5
Re: C++ Folder View in Visual Basic Forms Application
Posted 16 January 2012 - 03:44 PM
You don't. the whole "Control" is written for you by Microsft. I don't know what folderBrowswerDialog is, but if it is a wrapper for SHBrowseForFolder then you call it, it opens the same dialog the guy in the video has and allows you to select from a folder on your drive.
If you just want to select a file or view whats in a folder use whatever wrapper C++ has for the Open/Save Common Dialog the API for that is GetOpenFileName
If you just want to select a file or view whats in a folder use whatever wrapper C++ has for the Open/Save Common Dialog the API for that is GetOpenFileName
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote







|