Geeky/Programming Ramblings

Why is MFC Not Dead?

I was reading through some blogs this morning, and ran across this one, from my MSDN Feed.

Here is my answer (I wanted to leave a comment, but it wasn’t working, and I figured it would be a good blog post anyways)

Right now you can make an MFC app and it can run on win98,2k,xp,vista, etc – out of the box. Anything with .NET requires the framework, and if you want your app to just be downloaded and ran, then the framework limitation hurts you. Why make someone download and install a d 20+ MB framework?

I wish there was a way to deploy .net apps without the framework, maybe with just assemblies the apps needs.

But like I said, companies want apps to run on as many clients as possible, which just isn’t a reality with .NET, but it is with MFC.

I really think Microsoft is clueless on why people use MFC and not .NET or even an Web App. Finally, MSFT is starting to use .NET in their client apps here and there (WLW, SSMS, Zune, etc, etc)

Once all apps written by Microsoft use some form of .NET, and Windows 98, 2000, and XP are gone for good (or at such small % of market share they don’t matter, say < 1%), then we can actually write .NET client applications (and have to target the version of .NET on Vista, since that is the lowest common denominator) – OR… MSFT could push .NET as a critical update to XP and wipe the % of .NET installed down to a low enough number to make it feasible to create .NET client apps and get a good chunk of the market share..

There are always going to be people that use MFC for whatever reason, but ease of use is certianly not one of them. A small example is, in .NET, I can create an app that displays a toast message, has a systray icon, connects to FTP, handles web services, and much much more, in very little time, and with a small number of lines of code, whereas in MFC, doing those things is a huge undertaking, 1000's of lines of code, and even then some of it is very "hackish". Yes, doable, but not very easily.

Another argument could be as well, that if your app is good enough, people will download it and install the framework if they don't have it, and I think that is a very good argument (except windows 98 is out of luck – can't install .NET) – I think this last argument is the best – if people want it, and it is an awesome app, they will install whatever to get it to run.

Anyways, I am rambling.. probably could keep talking on this topic for another 100 paragraphs or so. šŸ™‚

By Steve Novoselac

Director of Digital Technology @TrekBikes, Father, Musician, Cyclist, Homebrewer

15 replies on “Why is MFC Not Dead?”

The same argument would apply to why Delphi is not dead yet.

The last company I was at were converting a Delphi app to .net.
Since most of them were Delphi developers they would not hesitate to tell me everytime I was using an app written in Delpi. There was to many to name.

And their gripe was the same. They didn’t like having to include the .net framework with everything that was developed.


People still use MFC because that’s what Microsoft themselves use. This is a case of Microsoft not eating their own dog food.

What Microsoft should have done if .net really was a ‘bet the bank’ technology as they claim, would have been to always include all the .net releases to-date with the releases of Windows. This would have solved many pain points for developers. Why they never did this – who knows?

A friend of mine recently got a new Dell and he asked me to help him set it up. Out of curiosity I looked at what was pre-installed on it. Sadly for .net, the Java JRE 6.0 WAS installed but not dot net.


Yeah I have used a few of those tools that strip out just what you need, I kind of mentioned it in the post. Some of them work, some don’t depends. When I was testing, I could never get my exe less than 5-8 MB, which is still very high (I could make same app in MFC in 500kb)


“Right now you can make an MFC app and it can run on win98,2k,xp,vista, etc – out of the box. Anything with .NET requires the framework, and if you want your app to just be downloaded and ran, then the framework limitation hurts you. Why make someone download and install a d 20+ MB framework?”

This is quite misleading. Here’s why: First of all Vista comes with .net 3.0 framework so all .net applications will work out of box on vista. And even now vista is being widely used.

For XP, IIRC windows xp service pack 2 also includes .net framework 2.0. So if we add up all computers Vista + Windows xp sp2 which should make around 80% of all desktop computers. There are some win 98 or win2000 computers but usage is relatively small.

One final note, your .NET applications WILL RUN ON LINUX OUT OF BOX TOO!!!. Yes you heard it correct any gnome based linux distro includes mono which is close to .net 3.5 level at the time being.


Yes, all apps will work on vista. According to market share reports for March 2008, its around 14% – not to shabby, but not to great either, (report here: I don’t see anywhere where .net framework is installed with sp2, I don’t believe it is, I may be wrong – ( – every time they ship it, its an optional install, just like it is an optional install on windows update. I think Windows Media Center XP and Tablet XP Editions had 1.1 by default because apps on their needed it, but market share for those are blips on the radar.

As far as in running on linux out of the box too, according to that market share report above linux is .61%, once again a blip, and take that .61 and reduce it to gnome based linux distros that are totally up to date. Also you have to remember just because you make it with .NET on windows doesn’t mean it will run in mono. Many of the windowing functions aren’t the same (GTK#, etc) and then registry and other windows specific stuff might not work in mono, so with that you can say, yeah it might run on a few machines, if you code your app in just the right way, but, it really doesnt.

I still stick by my point that the MAJORITY of boxes out there won’t run your app by default, and if you want the broadest market share, you just aren’t going to choose .NET


WinXp Professional or Home Editon have only the Version 1.1 of the .NET suite installed.The other version are optional.And it’s not only about the size of the .NET applications,it’s also about their speed of execution and their performance in general.They say that it’s only a minor reduction,but if you compare any application written in C# or C++/CLI with one written in native/unmanaged C++ you’ll see that the performance
is becoming an issue with the larger applications.And don’t forget the security problem of the MSIL…Despite all the obsfuscators and encrypters and such tools,the decompiling of the intermediate language is not a very big problem.


I realize this is a little late but there are two reasons.

#1 reason of course is the sheer volume of MFC apps in use on the planet Earth right now. There are those who would have you believe that .NET is everywhere but nothing could be further from the truth.

#2 For many people there is simply no reason to incur either the penalty of rewriting all those huge apps in C# or the penalty of .NET’s comparatively poor performance. I can hear eyebrows going up already but if you make database apps all day you probably don’t know the difference to begin with. If on the other hand you learned your craft in a performance-oriented world then the difference is as plain as day.

Not only that, but recent developments in .NET are even LESS attractive to people like me. What could the purpose of something like WPF *possibly* be except to consume memory & CPU in breathtaking amounts?

MFC cannot die anytime soon, despite the woefully wrong direction the folks at MSFT have taken as of late.


Since 2010 MFC is undergone a major upgrade, that, combined with Modern C++, means it’s alive, well, and lacking NOTHING. If you’re writing desktop apps for Windows, using C++ libraries, (you don’t want to mix managed and unmanaged code without a very good reason) and need a high performance GUI, it’s the superior choice . Personally, I think it’s elegant, and arguably one of the best C++ libraries ever written.


Borland ‘s ObjectWindows Library was far superior, as was the Visual Component Library. But that company didn’t care well in the market, and Visual Studio bundled Visual C++ and MTV with Visual Basic. Microsoft also has strong back office tooking, so using their framework and data access libraries was more efficient than something like Borland Database Engine. MFC tended to pick up support for new Windows platform features earlier, as well.

But as a a C++ class library/application framework, Borlands’s offerings were clearly superior to Microsoft’s.

They had better C++ compilers back then, as well.

Visual C++ and MFC won for reasons similar to how Access won over other Database applications.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.