none
Is there anyone still doing serious programming using MFC?

    Question

  • It seems there are not so many books on MFC available nowadays.  Most of them are very old and rare to find. Windows forms/desktop programming are rarely used these days as a professional work's project, also.

    Is there anyone doing serious work using MFC these days or Microsoft's plan is to focus only in web and devices programming for the future, planning to totally eliminate MFC and Windows Forms/Desktop programming forever?

    Is it a waste of time learning to use MFC? What do you think?


    Sandro H. Nakaguma

    Tuesday, March 24, 2015 1:17 PM

Answers

  • To me the huge gap is:  Windows 10 has a reemphasis on the desktop, but there aren't any desktop UI technologies that aren't legacy.  It is far from clear to me that Universal Apps will be capable of running with all the permissions that desktop applications will

    Like Chief Scientist, I would probably elect for my UI in WPF for a desktop app, although I might choose MFC for a simple program that I wanted to keep fully in C++.

    • Marked as answer by Shu 2017 Wednesday, April 1, 2015 12:37 PM
    Tuesday, March 24, 2015 3:16 PM
  • On 24/03/2015 14:17, SandroNakaguma wrote:

    It seems there are not so many books on MFC available nowadays.  Most of them are very old and rare to find. Windows forms/desktop programming are rarely used these days as a professional work's project, also.

    Is there anyone doing serious work using MFC these days or Microsoft's plan is to focus only in web and devices programming for the future, planning to totally eliminate MFC and Windows Forms/Desktop programming forever?

    Is it a waste of time learning to use MFC? What do you think?

    There are several legacy projects that started as MFC projects and are still maintained using MFC.

    For new projects, the situation is different, and I'm not finding MFC used much.

    An alternative to MFC, specific to Windows desktop, is WTL: this is a tiny C++ wrapper around Win32 APIs, built on top of ATL.
    However, probably MFC offers better integration than WTL with Visual Studio IDE, for example with ClassWizard (even though I read somewhere of a project trying to offer a simil-ClassWizard experience for WTL).

    If you are interested in a cross-platform technology, you may find Qt an interesting option.

    Giovanni

    • Marked as answer by Shu 2017 Wednesday, April 1, 2015 12:37 PM
    Wednesday, March 25, 2015 8:08 AM

All replies

  • I think that MFC is a great technology that has seen its day

    If I were to be developing a new application today, I would not program using MFC, but would opt for anything having XAML as its UX language instead.

    Of course, the most forward-looking way of building anything now is using the Universal App Platform, which will be Windows 10 and any of its updates.  it isn't too hard to target Windows 8.1 and Windows 10 with the 8.1 WinRT API's and UAP.

    If you need compatibility with Windows 7 and greater, you would probably target WPF, and not MFC or forms.  WPF will tie you to the "desktop" / "legacy" side of things and will lock you out of the "store".

    From what I heard yesterday, I would stay away from Silverlight, though.

    I'm sure this discussion will invite a debate, so I stand clear to find out what everybody else thinks.

    Enjoy!

    -e


    -- me --

    Tuesday, March 24, 2015 2:28 PM
  • To me the huge gap is:  Windows 10 has a reemphasis on the desktop, but there aren't any desktop UI technologies that aren't legacy.  It is far from clear to me that Universal Apps will be capable of running with all the permissions that desktop applications will

    Like Chief Scientist, I would probably elect for my UI in WPF for a desktop app, although I might choose MFC for a simple program that I wanted to keep fully in C++.

    • Marked as answer by Shu 2017 Wednesday, April 1, 2015 12:37 PM
    Tuesday, March 24, 2015 3:16 PM
  • Based on my experience, if I look back over the last 15 years, many people hated MFC. But, those haters were not able to back up hating with some facts or meaningful explanations. All mentioned reasons were always in a highly hypothetical domain, or in some personal preferences domain. Since nothing is perfect, you can always find something bad, but the bottom line is that it does the job well.

    Also, projects in which I have been involved have had great benefits from MFC. During that time I also started one project based on MFC from scratch. All MFC related problems were solved in one way or another, but I was never facing a wall because of MFC. From my perspective it is very good and usable technology. If you don’t need cross platform development, mobile apps (MFC is available, but different), or generally you cannot see any potential pitfall from using MFC, I don’t see why not to consider it. While it speeds things up, you are still free to go on lower API level if needed.

    P.S.

    If your software architecture is good, you can use what you want.

    Tuesday, March 24, 2015 6:50 PM
  • Mark me down as an MFC hater.

    Like many libraries, it can certainly increase your initial productivity, and like many libraries, you can run into limitations that slow you down later on.  I have used it successfully on many projects, including a couple of big ones.  One of my problems with it is that it is not really object oriented, and it makes it difficult or contrived to implement some of the design patterns.

    I still use old win32 a lot, but I would not voluntarily choose to use MFC.  My preferences are win32 for lower-level programs and .Net for higher-level ones.

    I think SimonRev had it right. It's not clear what the best UI framework for desktops is now.

    Tuesday, March 24, 2015 10:21 PM
  • On 24/03/2015 14:17, SandroNakaguma wrote:

    It seems there are not so many books on MFC available nowadays.  Most of them are very old and rare to find. Windows forms/desktop programming are rarely used these days as a professional work's project, also.

    Is there anyone doing serious work using MFC these days or Microsoft's plan is to focus only in web and devices programming for the future, planning to totally eliminate MFC and Windows Forms/Desktop programming forever?

    Is it a waste of time learning to use MFC? What do you think?

    There are several legacy projects that started as MFC projects and are still maintained using MFC.

    For new projects, the situation is different, and I'm not finding MFC used much.

    An alternative to MFC, specific to Windows desktop, is WTL: this is a tiny C++ wrapper around Win32 APIs, built on top of ATL.
    However, probably MFC offers better integration than WTL with Visual Studio IDE, for example with ClassWizard (even though I read somewhere of a project trying to offer a simil-ClassWizard experience for WTL).

    If you are interested in a cross-platform technology, you may find Qt an interesting option.

    Giovanni

    • Marked as answer by Shu 2017 Wednesday, April 1, 2015 12:37 PM
    Wednesday, March 25, 2015 8:08 AM