Home arrow C++ arrow Page 5 - Using MFC in C++ Part 1: A Basic Application Skeleton

Using MFC in C++ Part 1: A Basic Application Skeleton

Microsoft Foundation Classes allow C++ developers to write windows apps easier and faster. In this article, Mitch starts from scratch and digs deep into the MFC toolbox to provide you with all of the code and details to create a simple MFC based Win32 app.

Author Info:
By: Mitchell Harper
Rating: 5 stars5 stars5 stars5 stars5 stars / 79
November 26, 2001
  1. · Using MFC in C++ Part 1: A Basic Application Skeleton
  2. · Building the framework
  3. · Creating the framework classes
  4. · Adding the code to MyClass.cpp
  5. · Making sure our application runs
  6. · Responding to windows messages
  7. · Conclusion

print this article

Using MFC in C++ Part 1: A Basic Application Skeleton - Making sure our application runs
(Page 5 of 7 )

As with may other commercially available compilers, there can be certain “issues” which will prevent some simple code from compiling on some machines. This too can be the case with Visual C++.

Try compiling your app by clicking on the Build menu and then on “Execute MFCSample.exe”. If your app runs, then you should see a dialog window with minimize, restore and maximize buttons. Congratulations, you’ve just created your first basic MFC App!

If not, try this: Click on the Projects menu and then on the Settings… option. Click on the C/C++ tab and change the category list to “Code Generation”. Under the user run-time library selection box, change it to “Debug Multithreaded”. Click on the OK button and try compiling it again. It should work fine.

The one and only window of our simple MFC based Ap

Now, lets add some fun to our app and give it some usability!
blog comments powered by Disqus

- Intel Threading Building Blocks
- Threading Building Blocks with C++
- Video Memory Programming in Text Mode
- More Tricks to Gain Speed in Programming Con...
- Easy and Efficient Programming for Contests
- Preparing For Programming Contests
- Programming Contests: Why Bother?
- Polymorphism in C++
- Overview of Virtual Functions
- Inheritance in C++
- Extending the Basic Streams in C++
- Using Stringstreams in C++
- Custom Stream Manipulation in C++
- General Stream Manipulation in C++
- Serialize Your Class into Streams in C++

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials