I suggest you ...

Improve MFC

Like many developers we maintain and develop an extremely large enterprise MFC application. All in all about 1.5 million lines. Asides from the addition of ribbons and a few extra controls we have had very little improvements in how we can work with MFC or native Win32 apps (in fact, the speed has gone down and classwizard seems to have gone from bad to worse to gone). Can you consider:

1. Improving the Dialog editor so that we can lay out dialogs with guides and the extra alignment options that are standard with C# - automatically spacing items correctly and so on.
2. Introduce a standardised feature for resizable dialogs, somewhat akin to C#'s docking or attaching.
3. Please, please, please allow us to work on the tabs of a tab control directly. Tab controls are a real pain to work with.
4. Change the class wizard so that a dialog header file doesn't contain its resource ID in the header. Having '#include "resource.h"' in the header of every class is a pain and causes numerous conflicts in applications that have many dialogs.

Essentially I'm asking to have the MFC functionality brought up to line with what we have in Windows Forms. Developers who are still using MFC are almost certainly like us in that they are using it because they have a large enterprise solution to maintain. Such developers are professionals using Visual Studio to build big, serious, expensive applications. Whilst improvements in C#, WinForms, WPF, SL and so on are great, MFC has been woefully neglected for years.

2,437 votes
Sign in
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Dave KerrDave Kerr shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    Visual Studio TeamAdminVisual Studio Team (Product Team, Microsoft) responded  · 

    Thanks for the feedback. As a quick update, we are still in planning for the next version of Visual C and as such we are unable to share plans.

    Microsoft does still own MFC :)


    Sign in
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      • AliAli commented  ·   ·  Flag as inappropriate

        One of the much needed feature is to simplify hosting .NET controls in MFC, or mixing managed code in MFC, this way we can move our legacy code smoothly to dot net.

      • AnonymousAnonymous commented  ·   ·  Flag as inappropriate

        i think the better idea would be to gave up to MFC and all Windows UI to be XAML

      • Fernando A. Gómez F.Fernando A. Gómez F. commented  ·   ·  Flag as inappropriate

        Just don't reinvent MFC and leave us some half-baked solution like WinRT... It really is because of necessity, I'm trying to build fluent apps with WPF and the Fluent ribbon, and man it's painfully slow. There really is no good alternative for being productive.

      • gast128gast128 commented  ·   ·  Flag as inappropriate

        Maybe they could give MFC a facelift. Start with using the stl and its containers instead of CString and the MFC container classes. The new docking support in MFC is really cool but spying at BCGsoft's code they are really messy programmers with lots of use of globals and casting from vase class. Why didn't they use the templated stl containers with its inherited type safety?

      • Mario PintaricMario Pintaric commented  ·   ·  Flag as inappropriate

        I used to live and breath MFC. When the technology became a life hazard, I moved on. If WinRT XAML and its support of C++ could run on the desktop, the MFC older timers would be given a very viable lifeline to a new life.

      • Michael F CellarMichael F Cellar commented  ·   ·  Flag as inappropriate

        I believe MFC is one the best -maybe the best- designed GUI libraries. Please do not change anything. I particularly like the great macros.

      • PJTraillPJTraill commented  ·   ·  Flag as inappropriate

        Not sure if still so, but I found it hard to make dialogues resizable — and guess what, one of the most infuriating aspects of the typical MS UI is fixed size dialogues (e.g seeing ~5/2000 users)!

      • Julio RaffaineJulio Raffaine commented  ·   ·  Flag as inappropriate

        Is there someone listening to this ?!?!? ... MFC is tragic, but it seems neither Microsoft care about this nor it's something they are owners anymore. I heard the fellas of BCGSoft actually develops MFC ... someone knows about it?

      • Iwona Kirby-GreenIwona Kirby-Green commented  ·   ·  Flag as inappropriate

        If anyone wants range for support for MFC collections just email me. I have a single header file that adds this.

        tomkirbygreen at gmail dot com

      • AndreyAndrey commented  ·   ·  Flag as inappropriate

        Please add "range based for" support for CArray:
        CArray<T> array;
        for (auto& val : array) {}

      • ChrisChris commented  ·   ·  Flag as inappropriate

        That is a nice idea. +1

        Most of us are working with big legacy applications written in MFC. Rewriting the whole thing with Qt or C# is too expensive. That is why we need improvements with new MFC versions.

      • Massood KhaariMassood Khaari commented  ·   ·  Flag as inappropriate

        MFC is real pain in comparison with popular GUI frameworks like Qt. I wonder why Microsoft won't make real updates to it. Despite regular version releases, it follows the basic architecture and fundamentals it was based on many years ago.

        It should (must) be reinvented and re-designed into a real OO architecture and well-structured programming model, not just being a flat wrapper for Windows APIs.

      • JohanJohan commented  ·   ·  Flag as inappropriate

        I too think that we need a modern C++ wrapper of the native Windows APIs. However, in its current state I hesitate building a new application user interface using MFC, even though I consider myself an expert at it. Well, what should be the first choice of design tool from Microsoft when building native applications in the style of Windows forms/dialogs?

        With all the new features of C++11, it feels a bit dull to keep writing the old BOOL and NULL macros instead of bool and nullptr. I think it's time to deprecate CList, CArray (it doesn't even support non-POD types because of memcpy), etc and add support for the standard library containers that we can use with lamdas, etc.

        It may be possible to solve polymorphically, but ideally I wish for a new full-blown MVC "MFC 2.0". To upgrade existing MFC projects we then need provided tools to convert all dialogs in our rc files into new XML style resources, etc. I would very much like to see something similiar to the Qt resource system where you can reach into the resources to get any embedded binary file as easy as ":/resources/image.png".

        I would also like to see better tools to help us create the UI in different languages (again, Qt has a better solution in my opinion). In MFC you now need to create 20 versions of each string table and of each and every dialog! On top of that, the layout of dialogs must be adjusted according to the asian languages where the controls have other dimensions (and to verify the results you need to buy and install different versions of Windows). If you forget to add an ID in some version of the dialog, the application will crash when running it in that particular language. It becomes a nightmare to maintain.

      ← Previous 1

      Feedback and Knowledge Base