Click here to Skip to main content
15,908,841 members
Articles / Desktop Programming / MFC
Article

Grouping project files into folders

Rate me:
Please Sign up or sign in to vote.
1.50/5 (6 votes)
19 Jan 2000 65.8K   14   7
A tip on organising your project files in the DevStudio Workspace window

Visual C++ provides the following folders by default when you create a new project:

  • Source Files
  • Header Files
  • Resource Files

Based on whether there are any external dependencies, it also provides an 'External Dependencies' folder. This is a special folder and you cannot modify it's properties.

Files that you add to your project are grouped based on their extensions. The extensions for the default folders are as follows:

Source Files:cpp;c;cxx;rc;def;r;odl;idl;hpj;bat
Header Files: h;hpp;hxx;hm;inl
Resource Files: ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe

Tip #1: You can right click on any of these folders and add or delete file extensions in the properties tab that is displayed.

Tip #2: You can add new folders by selecting 'Project | Add to Project | New Folder...' from the main menu. This displays a dialog box that let's you add the name of the folder as well as the extensions for files you want to group into that folder.

I frequently use this feature to add a 'Documentation' folder and include the extensions 'htm;html;doc;txt'. This enables me to group the documentation files for my VC++ projects within the project itself for easier access. Since I also use Visual SourceSafe to store my project's documentation, this allows me to perform any SourceSafe operation from within VC++.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Questionhow to write objec orinted Pin
seidu8-May-06 22:39
seidu8-May-06 22:39 
Generalbeginer Pin
dnqhung12-Jun-04 20:31
dnqhung12-Jun-04 20:31 
GeneralWarning: VC Upgrades May Cause Problems Pin
Member 366021-Jan-00 1:05
Member 366021-Jan-00 1:05 
GeneralRe: Warning: VC Upgrades May Cause Problems Pin
Greg Marr1-Feb-00 3:03
Greg Marr1-Feb-00 3:03 
GeneralAdditional Tip, and some things you should know... Pin
James R. Twine20-Jan-00 2:26
James R. Twine20-Jan-00 2:26 
GeneralAlso available with ClassView, but keep backups Pin
Tim Pfeiffer20-Jan-00 12:30
Tim Pfeiffer20-Jan-00 12:30 
I started using this feature when VC++ 6 first came out and the ClassView was -excruciatingly- slow with my main project of several hundred classes. 'Hiding' most of them in subfolders alleviated the problem (which seems to be completely resolved with sp3).

I still use the feature just to help organize my classes in logical groups, but have found the information to be very 'fragile'. It always remembers the folders and subfolders I've created, but occasionally all classes are moved back to the 'root' folder. This gets pretty tedious with so many classes to reorganize.

The information appears to be stored in your workspace's OPT file. I now keep this in SourceSafe, and just leave it always checked out. Every time I make a release version, I check in this file (as well as a few other project setting files). It's saved a lot of time for me
GeneralRe: Additional Tip, and some things you should know... Pin
Anonymous23-Jan-04 3:13
Anonymous23-Jan-04 3:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.