Saturday, May 22, 2004
The Code Project - Enumdesk Clones - Tree Controls
The Code Project - Enumdesk Clones - Tree Controls: "Using the code
Comments wherever applicable have been inserted in the code files of the classes but not to the above mentioned project.
This project contains 2 classes for creating Windows-like GUI at your end, you can use these classes to create either Views or Controls on Dialog. Download the source zip file and unzip to your local folder, files are as given below:
Classes (Folder)
ShellViewClasses (Folder)
ShellClass.cpp
ShellClass.h
ShellViewClasses.cpp
ShellViewClasses.h
ShellCtrlClasses (Folder)
ShellClass.cpp
ShellClass.h
ShellCtrlClasses.cpp
ShellCtrlClasses.h
Adding files to your project
After creating you project you can add the above downloaded class files by selecting from the Visual Studio menu. Project->Add To Project->Files and then select the class files to add. You have to add all 4 files depending on which type of project you are creating (View CShellViewClasses OR Dialog CShellCtrlClasses. CShellClass is similar in both cases).
Creating Views
To create view style Windows-Explorer like project, create a new project from the Visual Studio Wizard, select 'MFC AppWizard (exe)' , lets name the project Test. Next select 'Single Document' for type of application, click 'finish'.
Drag-Drop /copy the files listed in the Classes\ShellViewClasses folder as shown in 'Using the Code' section above. Add the class files to you project as show in the section 'Adding Files to your Project' (this is not essential).
To create only a Files View (TreeView) open the Test.cpp for editing, add the following line at the top (after TestView.h).
#include 'ShellViewClasses.h'
In the InitInstance() function cha"
Comments wherever applicable have been inserted in the code files of the classes but not to the above mentioned project.
This project contains 2 classes for creating Windows-like GUI at your end, you can use these classes to create either Views or Controls on Dialog. Download the source zip file and unzip to your local folder, files are as given below:
Classes (Folder)
ShellViewClasses (Folder)
ShellClass.cpp
ShellClass.h
ShellViewClasses.cpp
ShellViewClasses.h
ShellCtrlClasses (Folder)
ShellClass.cpp
ShellClass.h
ShellCtrlClasses.cpp
ShellCtrlClasses.h
Adding files to your project
After creating you project you can add the above downloaded class files by selecting from the Visual Studio menu. Project->Add To Project->Files and then select the class files to add. You have to add all 4 files depending on which type of project you are creating (View CShellViewClasses OR Dialog CShellCtrlClasses. CShellClass is similar in both cases).
Creating Views
To create view style Windows-Explorer like project, create a new project from the Visual Studio Wizard, select 'MFC AppWizard (exe)' , lets name the project Test. Next select 'Single Document' for type of application, click 'finish'.
Drag-Drop /copy the files listed in the Classes\ShellViewClasses folder as shown in 'Using the Code' section above. Add the class files to you project as show in the section 'Adding Files to your Project' (this is not essential).
To create only a Files View (TreeView) open the Test.cpp for editing, add the following line at the top (after TestView.h).
#include 'ShellViewClasses.h'
In the InitInstance() function cha"