We help IT Professionals succeed at work.

Why MFC is bad?

Everyone is claiming MFC , but why it's bad?
I caught myself on blaimig MFC without knowing why? So, it's kind of blaiming some technology without knowing the
Yes, I have worked with MFC a little bit, but it's not enough to understand cons of MFC.
Please, Provide real world examples and source codes, that will show that MFC - is not a piece of pie.
Watch Question

Neil RussellTechnical Development Lead

Why is the sky Blue?

The question you have asked makes far less sense than why is the sky blue but you may as well have asked.

Who told you that MFC is bad?  Why do YOU think MFC is bad?

If you asked a question by explaining YOUR thoughts and YOUR reasons for the question or at least pointing out what you have read/heard/been told by others then a discussion can be had but your question really does not mean anything.


I've requested that this question be deleted for the following reason:

Experts got nervous.
Top Expert 2012
Am I going to say that MFC is bad? As someone who used it for like a decade? I am going to say both 'yes' and 'no'. The 'yes' part is rooted in the very origins of MFC, which date back to 16bit Windows and all the compatibility issues that this fact implies. Multithreaded UI with MFC? Sure, if you are prepared to go through hell. C++ standard conformance? Err, forget about it. Yet that is not MFC's fault, since it was conceived way befor there was a C++ standard. It also was the only class librariy in the 90s(!) that allowed for decent UIs without reinventing the wheel.

Now, is it still that bad? Yes and no. The 'yes' part is based on the fact that there are now way more alternatives. The 'no' focuses legacy applications tat where once written with MFC and still are functioning, but IMO deserve a rewrite.

So, if you'd ask me directly what I would choose in a non-trivial Windows application setup nowadays, my answer would probably be to 'write the backend in C++ and provide an nice UI using C# with WFC'.

So, to get back to the bottom line, I'd just say it is neither - it is just outdated on so many levels...


jkr, very wise position. That's the sort of answer that I wanted to hear :)