HOME
Login
Change Info
Logout


TUTORIALS

C, C++
Win32
Java
Visual Basic
MFC
DCOM
Networking
C#
Perl
HTML
XML
ASP
PHP
Javascript
Other

DOWNLOADS
ITCLib
SourceVizor meets the notification, reporting, and admin needs of teams using Microsoft Visual SourceSafe.
Free 30-day trial!


Creating a Simple MFC Program

by Alan Oursland

Creating a New Project

We want to create a new project based on SimpleMFC. We can either repeat the process described above (not my favorite - I won't remember all of those steps), or we can copy the existing one. Copy the entire directory for SimpleMFC into its parent directory. You should get a new directory with the name "Copy of SimpleMFC". Change the name of this directory to "SimpleExtMFC". Delete any object files and executables you may have copied (or just delete the "Debug" and "Release" directories if they exist).

Change the names of all of the files containing SimpleMFC to SimpleExtMFC. The easiest way to do this is in a DOS prompt. Set the prompt to the new directory and type "rename SimpleMFC*.* SimpleExtMFC*.*". Do the same in the "res" directory.

Do not open the project file yet. In Developer Studio, do an "Edit-Find In Files" for SimpleMFC. Be sure to set the search location to the new directory. Search all file types (*.*). Do not match whole word only. You will find matches in the following files:

MainFrm.cpp
ReadMe.txt
SimpleExtMFC.clw
SimpleExtMFC.cpp
SimpleExtMFC.dsp
SimpleExtMFC.dsw
SimpleExtMFC.h
SimpleExtMFC.plg
SimpleExtMFC.rc
StdAfx.cpp
SimpleExtMFC.rc2

Replace all instances of SimpleMFC with SimpleExtMFC in these files. (You can actually delete SimpleExtMFC.clw. This is the classwizard file, and will be rebuilt if you delete it.) Open each file and use the Replace menu to replace all instances. (Hint: if you press F3, the first occurrence of SimpleMFC will become highlighted, which makes using the Find and Replace dialog much easier.) Save all of the files and open your brand new project.

Previous Page
Return to beginning of article

Next Page


Featured Article

An Introduction to C#
By Joey Mingrone

Register Today!


100% FREE

Members enjoy these benefits:
Access to ITI Downloads
Access to more articles and tutorials
Optional weekly newsletter
And more...

Click here to register
Or
Click here to log in



© 2008 Interface Technologies, Inc. All Rights Reserved
Questions or Comments? devcentral AT iticentral DOT com
PRIVACY POLICY