Difference between Win32 and MFC?

Started by
5 comments, last by Ekim_Gram 20 years, 8 months ago
Can somebody explain the difference between these two and why a lot of people don''t like MFC? There''s no town drunk here, we all take turns. Velocity Gaming Force
Advertisement
MFC is disliked because Microsoft had two sets of programmers. those who wrote the code for the MFC, and then a seperate team devoted to making it the most cryptic, polluted, and non-standard API set available that would still compile.
MFC is a set of wrapper classes for the Win32 API


Qui fut tout, et qui ne fut rien
Invader''s Realm
Win32 is an ever growing set of functions and structures used to write 32bit Windows Applications. It doesn''t use classes and other C++ features since it was created before C++ was the next big thing. MFC is a C++ wrapper for the Win32 API.
<span class="smallfont">That is not dead which can eternal lieAnd with strange aeons even death may die.   -- "The Nameless City" - H. P. Lovecraft</span>
It''s more then just a wrapper for the win32 library, it is a framework and a very powerful framework at that.

MFC is a generic windows framework originally design to speed up creating window. As years pass on, it hope to capture as many type of windows app as possible... and that comes with a price - bizarre macro and evil wizard code. If you can live with it, it is fine.


Win32 API has a very large set of functions that deals with almost all aspect of MS Windows programming. That''s all I can say.
"after many years of singularity, i'm still searching on the event horizon"
All of these posts miss an important point.

MFC was designed to be a wrapper for Win32. It is decent at that.

However MFC was originally designed when C++ was little more than classes and virtual functions. As they upgraded it, C++ evolved (in the communal and compiler sense) more, but MFC had to stay the same because they had to retain compatibility with older apps written in MFC.

The result? What most people criticize as clunky, and I agree. Not to mention every single class uses the CClassname syntax (which I will add was used *ONLY* so that MFC class names wouldn''t collide with user class names. Hungarian notation be damned! Users using CClassname *completely* defeats the purpose of sticking C on the class name. You risk name collisions with MFC by prepending C on your classname. The Borland community has reported similar problems with people naming their classes TClassname because the VCL used TClassname.)

All of that nonsense could have been avoided by using namespaces.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis

This topic is closed to new replies.

Advertisement