Blog
    C#
    ADO.Net
    .NET
    ASP.Net & Web Forms
    Custom Controls
    Web Development
    Exception Handling
    XML
    Database
    Security in .Net
    Testing
    Web Services
    Windows Services
    Windows Controls
    WCF
    AJAX
    WPF
    XAML
    Reporting
    Setup
    VB.Net
    LINQ
    JQuery
    SilverLight
    JavaScript
    HTML5
    Crystal Report
    Cloud Computing
    Share Point
    Visual C++
    MVC
    Android
    PHP
    Java
    HTML
    WordPress
    Joomla
    Products
    Drupal
    Windows Phone
    JSON
    LightSwitch
    iPhone/iPad
    Ruby on Rails
    IIS 7
    Windows 8
    CSS/CSS3
    Excel
    MS Access
    Shortcut Keys
    Visual SourceSafe
    Team Foundation Server
    APIs
Follow Us
Follow _MindStick_ on Twitter View MindStick Software's LinkedIn profile View MindStick Software's Facebook profile
Top Contributor
Advertisement
Advertise with Us
Mindstick
Article Article  Forum Forum  Blog Blog  Quiz Quiz  Beginner Beginner  Careers Careers  Contact Contact  Login Login  
Home | Product | Services | About Us | Interview | DeveloperSection | Submit an Article | Submit Blog
Report Abuse Form
Reason:    
 

Home >> Visual C++ >> MFC (Microsoft Foundation class)
MFC (Microsoft Foundation class)

Introduction On MFC.
Views: 1576     Comments: 0
by Amit Singh on 5/8/2011

MFC (Microsoft Foundation class)

MFC built on concept of class hierarchy. Most of the MFC classes are driven from another class which is eventually driven from CObject.

When we use these classes they inherit many behaviors from their ancestors.

When we crate any MFC application (project name welcome) in vc++ it creates following files:

·         welcome.clw :                 This is the class wizard file

·         welcome.dsw:                  Main workspace file

·         welcome.h:                      Application header file

·         welcome.cpp:                   Application code file

·         StdAfx.h:                           Standard application framework header

·         StdAfx.cpp:                       Standard application framework code

·         MainFrm.h:                       Main window header

·         Mainfrm.cpp                     Main window code

·         welcomeDoc.h :                Document header

·         welcomeDoc.cpp:             Document code

·         welcomeView.h:               View header

·         welcomeView.cpp             View code

·         Resource.h                        Resource constants file

·         welcome.rc                        Resource file

·         welcome.ncb                     Layout and dependencies file

·         welcome.dsp                     Project file

·         res                                     Resource directory

·         readme.txt                         It contain the file information

For Example:

Displaying any message

We write the code in OnDraw() method in welcomeView.cpp file

void CWelcomeView::OnDraw(CDC* pDC)

{

      CString mesg="This is the first mfc application";

      CAmitMFC1Doc* pDoc = GetDocument();

      ASSERT_VALID(pDoc);

      pDC->TextOut(0,0,mesg);

}

Title :  
Comment :
Text ColorBackground Color
BoldItalicUnderline
LeftCenterRightJustify
Ordered ListBulleted List
IndentOutdent
Horizontal Rule
SubscriptSuperscript
HyperlinkImage
Design ModeDesign
View HtmlHtml
       
 
Report Abuse Form
Reason:    
 
Latest ArticleRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Latest Blogs by Amit SinghRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Top Viewed ArticlesRSS Feed
    
    
    
    
    
    
    
    
    
    
Top Viewed BlogsRSS Feed
    
    
    
    
    
    
    
    
    
    
Latest Interview QuestionsRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Total Online Users: 6691
  
Copyright © 2013MindStick. All Rights Reserved.