I am a big fan of Microsoft Technologies. Learned lot of .NET Framework and C# like programming languages. But I believe .NET applications are running on top of .NET Framework so They have some kind of slow. Then I heard about MFC a wrapper classes for Windows Development and It is standard for Commercial Application Development(I mean not business level application) so I want to know is it worth to learn MFC now? Is there any alternatives? I want to develop commercial level application Thanks for read my question.
uniqueunique2,22744 gold badges1919 silver badges2424 bronze badges
closed as primarily opinion-based by ta.speot.is, VladL, nemesv, David Heffernan, interjaySep 22 '13 at 12:08
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
2 Answers
No, I wouldn't learn it - I'd look into it to gain an insight into some of the ways the GUI classes work so you have a wider understanding of this old, but important, technology. But I would not learn it as a technology you want to create new GUIs into the future. Forget the non-GUI parts of MFC, only people who are big fans of Microsoft technologies used them, everyone else used much better libraries..
Although you can write great applications using it, TortoiseSVN for example, today using Winforms is much easier and gives you the same results. Yes, .net is slower than native code but for a GUI you're generally limited by the speed a human can react to changes, so a 'slow' system is still going to be ok, unless it gets so slow it is noticeably laggy or slow to respond. For this reason I'd skip WPF as I know too many support calls from myself and friends who all have complained about WPF's performance (there's also lots on the web about WPF being pretty poor).
there are alternatives, Qt is a great GUI tool. wxWidgets is good to, and also cross platform. Today the general attitude to GUIs are that they should be web-based, so you might be better advised to learn ASP.NET MVC 4 (not the older versions) as there appears to be a significant number of jobs for this technology today (tomorrow might be different!)
gbjbaanbgbjbaanb46.1k1010 gold badges9090 silver badges139139 bronze badges
There's still shops who have a MFC codebase who cant just throw it away since its well tested projects and for those it can be useful but as a learning exercise it would be better to learn straight Win32 programming from which MFC and .NET still is derived.
From my experience:Guerilla games the makers of the PS3 Killzone series have tools in MFC Bosch security systems where I worked still use MFCPhilips medical still has.
For new development they all use different technologies though.
Serve LaurijssenServe Laurijssen5,58644 gold badges2525 silver badges5555 bronze badges
Not the answer you're looking for? Browse other questions tagged c++.netwinapimfc or ask your own question.
The Microsoft Foundation Class (MFC) library provides a set of functions, constants, data types, and classes to simplify creating applications for the Microsoft Windows operating systems. In this tutorial, you will learn all about how to start and create windows based applications using MFC.
Prerequisites
We have assumed that you know the following −
- A little about programming for Windows.
- The basics of programming in C++.
- Understand the fundamentals of object-oriented programming.
What is MFC?
The Microsoft Foundation Class Library (MFC) is an 'application framework' for programming in Microsoft Windows. MFC provides much of the code, which are required for the following −
- Managing Windows.
- Menus and dialog boxes.
- Performing basic input/output.
- Storing collections of data objects, etc.
You can easily extend or override the basic functionality the MFC framework in you C++ applications by adding your application-specific code into MFC framework.
MFC Framework
- The MFC framework provides a set of reusable classes designed to simplify Windows programming.
- MFC provides classes for many basic objects, such as strings, files, and collections that are used in everyday programming.
- It also provides classes for common Windows APIs and data structures, such as windows, controls, and device contexts.
- The framework also provides a solid foundation for more advanced features, such as ActiveX and document view processing.
- In addition, MFC provides an application framework, including the classes that make up the application architecture hierarchy.
Why MFC?
The MFC framework is a powerful approach that lets you build upon the work of expert programmers for Windows. MFC framework has the following advantages.
- It shortens development time.
- It makes code more portable.
- It also provides tremendous support without reducing programming freedom and flexibility.
- It gives easy access to 'hard to program' user-interface elements and technologies.
- MFC simplifies database programming through Data Access Objects (DAO) and Open Database Connectivity (ODBC), and network programming through Windows Sockets.
Developer(s) | Microsoft |
---|---|
Initial release | 1992 |
Stable release | |
Written in | C++ |
Operating system | Microsoft Windows |
License | Proprietary |
Website | msdn.microsoft.com/en-us/library/d06h2x6e.aspx |
Microsoft Foundation Class Library (MFC) is a C++object-orientedlibrary for developing desktop applications for Windows.
MFC was introduced by Microsoft in 1992 and quickly gained widespread use. While Microsoft has introduced alternative application frameworks since then, MFC remains widely used.
History[edit]
MFC was introduced in 1992 with Microsoft's C/C++ 7.0compiler for use with 16-bit versions of Windows as an extremely thin object-oriented C++ wrapper for the Windows API. C++ was just beginning to replace C for development of commercial application software at the time. In an MFC program, direct Windows API calls are rarely needed. Instead, programs create objects from Microsoft Foundation Class classes and call member functions belonging to those objects. Many of those functions share their names with corresponding API functions.[2]
One quirk of MFC is the use of 'Afx' as the prefix for many functions, macros and the standard precompiled header name 'stdafx.h'. During early development, what became MFC was called 'Application Framework Extensions' and abbreviated 'Afx'. The name Microsoft Foundation Classes (MFC) was adopted too late in the release cycle to change these references.
MFC 8.0 was released with Visual Studio 2005. MFC 9.0 was released with Visual Studio 2008. On April 7, 2008, Microsoft released an update to the MFC classes as an out-of-band update to Visual Studio 2008 and MFC 9.[3] The update features new user interface constructs, including the ribbons and associated UI widgets, fully customizable toolbars, docking panes which can either be freely floated or docked to any side and document tabs.[4]
Microsoft Foundation Classes For C++ Download
MFC was initially a feature of the commercial versions of Visual Studio. As such, it is not included in the freeware Visual C++ Express.[5] The Community edition of Visual Studio, introduced in 2014, however, includes MFC.
Object Windows Library (OWL), designed for use with Borland's Turbo C++ compiler, was a competing product introduced by Borland around the same time. Eventually, Borland discontinued OWL development and licensed the distribution of the MFC headers, libraries and DLLs from Microsoft[6] for a short time, though it never offered fully integrated support for MFC. Borland later released Visual Component Library to replace the OWL framework.
Features[edit]
MFC is a library that wraps portions of the Windows API in C++ classes, including functionality that enables them to use a default application framework. Classes are defined for many of the handle-managed Windows objects and also for predefined windows and common controls.
At the time of its introduction, MFC provided C++ macros for Windows message-handling (via Message Maps[7] ), exceptions, run-time type identification (RTTI), serialization and dynamic class instantiation. The macros for message-handling aimed to reduce memory consumption by avoiding gratuitous virtual table use and also to provide a more concrete structure for various Visual C++-supplied tools to edit and manipulate code without parsing the full language. The message-handling macros replaced the virtual function mechanism provided by C++.
The macros for serialization, exceptions, and RTTI predated availability of these features in Microsoft C++ by a number of years. 32-bit versions of MFC, for Windows NT 3.1 and later Windows operating systems, used compilers that implemented the language features and updated the macros to simply wrap the language features instead of providing customized implementations, realizing upward compatibility. When does the little mermaid come out with ariana grande.
The MFC ribbon resource editor allows the developer to design the ribbon graphically instead of having to use the XML-based declarative markup like the RibbonX API. Optionally, ribbon components may be programmed directly by calling a new set of ribbon class methods. The developer may mix graphical and programmatic ribbon development as is convenient. The MFC application wizard has also been upgraded to support the new features, including a check-box to select whether the application will use the ribbon or the docking panes. The new functionality is provided in new classes so that old applications still continue to run.[4] This update is building on top of BCGSoft’s BCGControlBar Library Professional Edition.[8] Microsoft has imposed additional licensing requirements on users of the ribbons.[9] These include a requirement to adhere to Microsoft UI Design Guidelines, and a anti-competition clause prohibiting the use of the UI in applications which compete with Microsoft Office.
MFC can be used by linking a static library or by adding the MFC DLL.
Versions[edit]
Product version | Library | MFC version | Year introduced |
---|---|---|---|
Microsoft C/C++ 7.0 | MFC 1.0 | 1992 | |
Visual C++ 1.0 | MFC 2.0 | ||
Visual C++ 1.5 | mfc250.dll | MFC 2.5 | |
Visual C++ 1.51 | mfc250.dll | MFC 2.51 | |
Visual C++ 1.52c | mfc250.dll | MFC 2.5 (Last development platform for Windows 3.x) | |
Visual C++ 2.0 | mfc30.dll | MFC 3.0 | |
Visual C++ 2.1 | mfc30.dll | MFC 3.1 | |
Visual C++ 2.2 | mfc30.dll | MFC 3.2 | |
Visual C++ 4.0 | mfc40.dll | MFC 4.0 (mfc40.dll included with Windows 95) | August 1995 |
Visual C++ 4.1 | mfc40.dll | MFC 4.1 | |
Visual C++ 4.2 | mfc42.dll | MFC 4.2 (mfc42.dll included with the Windows 98 original release) | March 1998 |
eMbedded Visual C++ 3.0 | mfc42.dll | MFC 4.2 | |
Visual C++ 5.0 | mfc42.dll | MFC 4.21, a major upgrade from MFC 4.2. | |
Visual C++ 6.0 | mfc42.dll | MFC 6.0 | 1998 |
eMbedded Visual C++ 4.0 | mfcce400.dll | MFC 6.0 | |
Visual C++ .NET 2002 (Visual C++ 7.0) | mfc70.dll | MFC 7.0 | February 2002 |
Visual C++ .NET 2003 (Visual C++ 7.1) Visual C++ .NET 2003 + MS11-025[10] | mfc71.dll | MFC 7.1 MFC 7.10.6119.0 | April 2003 April 2011 |
Visual C++ 2005 (Visual C++ 8.0) Visual C++ 2005 SP1 Visual C++ 2005 SP1 + MS09-035[11][12] Visual C++ 2005 SP1 + MS11-025 (KB2467175)[10] Visual C++ 2005 SP1 + MS11-025 (KB2538242)[10][13] | mfc80.dll | MFC 8.0.50727.42 MFC 8.0.50727.762 MFC 8.0.50727.4053 MFC 8.0.50727.5592 MFC 8.0.50727.6195 (included in redist 8.0.61000/8.0.61001[14]) | October 2005 June 2007 July 2009 April 2011 June 2011 |
Visual C++ 2008 (Visual C++ 9.0) Visual C++ 2008 with Feature Pack Visual C++ 2008 SP1 Visual C++ 2008 SP1 + MS09-035[11][12] Visual C++ 2008 SP1 + MS11-025 (KB2467174)[10] Visual C++ 2008 SP1 + MS11-025 (KB2538243)[10] | mfc90.dll | MFC 9.0.21022.8 MFC 9.0.30411 MFC 9.0.30729.1 MFC 9.0.30729.4148 MFC 9.0.30729.5570 MFC 9.0.30729.6161 (installer has version 9.0.30729.5677) | November 2007 April 2008 August 2008 July 2009 April 2011 June 2011 |
Visual C++ 2010 (Visual C++ 10.0) Visual C++ 2010 + MS11-025[10] Visual C++ 2010 SP1 Visual C++ 2010 SP1 + MS11-025[10] | mfc100.dll | MFC 10.0.30319.1 MFC 10.0.30319.415 MFC 10.0.40219.1 MFC 10.0.40219.325 | April 2010[15] April 2011 March 2011 August 2011 |
Visual C++ 2012 (Visual C++ 11.0) Visual C++ 2012 Update 1 Visual C++ 2012 Update 3 | mfc110.dll | MFC 11.0.50727.1 MFC 11.0.51106.1 MFC 11.0.60610.1 (also included in redist 11.0.61030) | July 26, 2012 November 5, 2012 June 26, 2013 |
Visual C++ 2013 (Visual C++ 12.0) Visual C++ 2013 Update 2 Visual C++ 2013 Update 5 + KB3179560 Visual C++ 2013 Update 5 + KB4032938 | mfc120.dll | MFC 12.0.21005.1 MFC 12.0.30501.0 MFC 12.0.40660.0 MFC 12.0.40664.0 | October 5, 2013 December 30, 2014[16] July 8, 2016[17] July 18, 2017[18] |
Visual C++ 2015 (Visual C++ 14.0) Visual C++ 2015 Update 1 Visual C++ 2015 Update 2 Visual C++ 2015 Update 3 Visual C++ 2015 Update 3 + KB3165756 | mfc140.dll | MFC 14.0.23026.0 MFC 14.0.23506.0 MFC 14.0.23918.0 MFC 14.0.24210.0 MFC 14.0.24215.0 | July 20, 2015 November 30, 2015[19] March 30, 2016[20] June 27, 2016[21] August 2, 2016[22] |
Visual C++ 2017 (Visual C++ 15.0) Visual C++ 2017 (Visual C++ 15.2) Visual C++ 2017 (Visual C++ 15.4) Visual C++ 2017 (Visual C++ 15.6) Visual C++ 2017 (Visual C++ 15.7) Visual C++ 2017 (Visual C++ 15.7.3?) Visual C++ 2017 (Visual C++ 15.8) Visual C++ 2017 (Visual C++ 15.9) Visual C++ 2017 (Visual C++ 15.9.5) Visual C++ 2017 (Visual C++ 15.9.6) Visual C++ 2017 (Visual C++ 15.9.9) | mfc140.dll | MFC 14.10.25008.0 MFC 14.11.25325.0 MFC 14.12.25810.0 MFC 14.13.26020.0 MFC 14.14.26405.0 MFC 14.14.26429.4 MFC 14.15.26706.0 MFC 14.16.27012.6 MFC 14.16.27024.1 MFC 14.16.27026.1 MFC 14.16.27027.1 | March 7, 2017 May 10, 2017 October 10, 2017 March 6, 2018 May 7, 2018 May 31, 2018 August 14, 2018 November 13, 2018 January 10, 2019 January 24, 2019 March 12, 2019 |
Visual C++ 2017 (Visual C++ 16.0RC) Visual C++ 2019 (Visual C++ 16.0RC.3) Visual C++ 2019 (Visual C++ 16.1.0) | mfc140.dll | MFC 14.20.27404.0 MFC 14.20.27508.1 MFC 14.21.27702.2 | February 27, 2019 March 19, 2019 May 21, 2019 |
See also[edit]
- Active Template Library (ATL)
- Standard Template Library (STL)
- Windows Template Library (WTL)
References[edit]
- ^'Visual Studio 2019 Release Notes'. Msdn.microsoft.com. Retrieved May 21, 2019.
- ^Visual C++ Express Overview
- ^'Visual C++ 2008 Feature Pack shipped'. Blogs.msdn.com. Retrieved April 26, 2008.
- ^ ab'Quick Tour of New MFC functionality'. Blogs.msdn.com. Retrieved November 16, 2007.
- ^'Visual Studio Express Edition FAQ'. Microsoft.com. Archived from the original on June 11, 2011. Retrieved January 6, 2012.
- ^'Microsoft Buys Into Inprise, Settles Disputes'. Techweb.com. Retrieved January 6, 2012.
- ^Williams, Mickey; David Bennett. 'Creating Your Own Message Maps'. Inform IT.
- ^'MFC Update Powered By BCGSoft'. Msdn2.microsoft.com. Retrieved November 16, 2007.
- ^'Visual C++ 2008 Feature Pack Release Download Page'. Microsoft.com. Retrieved May 16, 2008.
- ^ abcdefg'MS11-025: Vulnerability in Microsoft Foundation Class (MFC) Library could allow remote code execution: April 12, 2011'. Microsoft.com. Retrieved June 10, 2019.
- ^ ab'Microsoft Security Bulletin MS09-035 - Moderate: Vulnerabilities in Visual Studio Active Template Library Could Allow Remote Code Execution (969706)'. Microsoft.com. Retrieved November 19, 2012.
- ^ ab'Protect your computer from the Active Template Library (ATL) security vulnerability'. Archived from the original on October 26, 2010. Retrieved October 29, 2010.
- ^'Microsoft Visual Studio 2005 Service Pack 1 MFC Security Update'. Microsoft.com. Retrieved November 19, 2012.
- ^'Where can I download Visual C++ Redistributables?'. Retrieved June 10, 2019.
- ^'Visual C++ - Exploring New C++ and MFC Features in Visual Studio 2010'. Msdn.microsoft.com. Retrieved November 19, 2012.
- ^'Visual C++ Redistributable Packages for Visual Studio 2013'. Msdn.microsoft.com. Retrieved December 30, 2014.
- ^'Update for Visual C++ 2013 and Visual C++ Redistributable Package'. Msdn.microsoft.com. Retrieved January 8, 2017.
- ^'Update for Visual C++ 2013 Redistributable Package'. Retrieved June 10, 2019.
- ^'Visual Studio 2015 Update 1'. Msdn.microsoft.com. Retrieved June 12, 2016.
- ^'Visual Studio 2015 Update 2'. Msdn.microsoft.com. Retrieved June 12, 2016.
- ^'Visual Studio 2015 Update 3'. Msdn.microsoft.com. Retrieved June 28, 2016.
- ^'Microsoft Visual Studio 2015 Update 3 (KB3165756)'. Msdn.microsoft.com. Retrieved August 28, 2016.
Further reading[edit]
- Prosise, Jeff (1999). Programming Windows with MFC (2 ed.). Microsoft Press. ISBN9781572316959.
- Shepherd, George (1996). MFC Internals (7 ed.). Addison-Wesley. ISBN9780201407211.
- Kruglinski, David (1997). Inside Visual C++ (4 ed.). Microsoft Press. ISBN9781572315655.
- Microsoft (1995). Microsoft Visual C++: Programming with MFC (2 ed.). Microsoft Press. ISBN9781556159213.
External links[edit]
- The latest supported Visual C++ downloads - Microsoft
- MSDN MFC Reference - Microsoft
- MFC: Visual Studio 2005 and Beyond - Microsoft
- An Inside Look At The Next Generation Of Visual C++ (covers the major MFC 9 updates) - Microsoft
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Microsoft_Foundation_Class_Library&oldid=901230234'
The Microsoft Foundation Class (MFC) library provides a set of functions, constants, data types, and classes to simplify creating applications for the Microsoft Windows operating systems. In this tutorial, you will learn all about how to start and create Windows-based applications using MFC.
This tutorial is designed for all those developers who are keen on developing best-in-class applications using MFC. The tutorial provides a hands-on approach with step-by-step program examples, source codes, and illustrations that will assist the developers to learn and put the acquired knowledge into practice.
To gain advantage of this tutorial you need to be familiar with programming for Windows. You also need to know the basics of programming in C++ and understand the fundamentals of object-oriented programming.
Available in Marketplace
Available in Marketplace
Available in Marketplace
Paperback$49.06$64.99Current price is $49.06, Original price is $64.99.
Available in Marketplace
Paperback$28.70$32.80Current price is $28.70, Original price is $32.80.
Available in Marketplace
Paperback$41.51$54.99Current price is $41.51, Original price is $54.99.
Available Online
Available in Marketplace
Paperback$37.79$44.99Current price is $37.79, Original price is $44.99.
Available in Marketplace
Available in Marketplace
Paperbackfrom $38.03$69.99Current price is $38.03, Original price is $69.99.
Available in Marketplace
Available in Marketplace
Available in Marketplace
Paperbackfrom $53.60$59.99Current price is $53.60, Original price is $59.99.
Available in Marketplace
Paperback$64.30$77.95Current price is $64.30, Original price is $77.95.
Available Online
Paperback$29.14$34.95Current price is $29.14, Original price is $34.95.
Available in Marketplace
What Is Microsoft Foundation Classes For C++
Available in Marketplace
Paperback$46.29$54.99Current price is $46.29, Original price is $54.99.
Available in Marketplace
Paperback$26.17$29.95Current price is $26.17, Original price is $29.95.
Available in Marketplace
Available in Marketplace
Available in Marketplace
Pagination Links