C#
  Home arrow C# arrow Page 5 - An Overview of MFC, Part 1
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
C#

An Overview of MFC, Part 1
By: Digvijay Chauhan
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 11
    2005-02-15

    Table of Contents:
  • An Overview of MFC, Part 1
  • Getting Started with MFC
  • What is MFC anyway?
  • Using the Windows Event Driven Model
  • Building our First Application

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    An Overview of MFC, Part 1 - Building our First Application


    (Page 5 of 5 )

    Just fire up VC++ and to create a new project; choose the File | New option in the File menu. Next, under the Projects tab, highlight Win32 Application. In the Location field type an appropriate path name or click the Browse button. Type in the word "HelloWorld" for the project name, and you will see that word echoed in the Location field as well. Click the OK button to get to the next window. Here, use the default selection "An empty project" and click "Finish" to see an info Dialog. Finally click "OK" to generate the workspace for the application code. You may copy and paste the above code or type it in yourself in a Cpp file that you create by selecting File | New and C/C++ source file on the Files tab. You can name the file whatever you want it to be.

    Also, you must now tell the compiler to use the MFC library. If you forget this step the project will not compile and link properly, and error messages will pop up. Choose the Settings option in the Project menu. Next on the General tab, in the Microsoft Foundation Classes combo box, choose the third option: "Use MFC in a Shared DLL" as shown below and then close the dialog by clicking OK.

    An Overview of MFC Part 1

    Figure 1: Telling the compiler to use MFC

    Now, to run the application press F5 or Ctrl + F5 and you shall see a window like the one below.

    An Overview of MFC Part 1

    Figure 2: Our First Application

    Conclusion

    In this tutorial you looked at what MFC is and what benefits it provides over C/SDK programming. We also successfully compiled and executed our first “Hello World” program. In next part we’ll get into understanding structure of MFC programs and how the user interface is separated from the application’s business logic.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Hi I'm Digvijay ....... the author of this article.Please feel free to ask any...
       · This article should be filed under C++ and not under C#Regards,Anand...
     

    C# ARTICLES

    - C# and XML
    - Pointers and Arrays in C#
    - C# 3.0 Extension Methods
    - Overloading Operators in C#
    - Iterators and Nullable Types
    - Patterns and Iterators in C#
    - C# Exceptions
    - Methods in C#
    - Delegates and Events in C#
    - Advanced C#
    - Working with Regular Expressions in C#
    - Sending Simple E-Mail in C#
    - Building C# Comparable Objects: IComparable ...
    - Color Transformation Applications in C# GDI+...
    - Performing Color Transformation Operations i...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT