Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5971731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:33:26+00:00 2026-05-22T20:33:26+00:00

I am currently working on a very large legacy MFC MDI application. It has

  • 0

I am currently working on a very large legacy MFC MDI application. It has a large number of UI elements – dockable toolbars, custom tree controls, context menus, etc. It is an image processing application so the main views render themselves using DirectX and OpenGL. The product is about 10 years old and one of the priorities here is to update the look and feel of it.

Knowing that Microsoft has done a good job of providing interoperability between C++/MFC and .NET I thought it would make sense to migrate the code base incrementally. What I’m struggling with now is where to start.

One approach is to rip out the MFC framework with WPF and reuse as much of the C++ code as we can. This will let us maximize the benefits of the WPF architecture but will mean a long development period until we’re fully functional again.

Another approach is to replace MFC controls one at a time with their WPF counterparts. This will allow us to work incrementally. My concern with this approach is that it means there will be an awful lot of connection points between managed and unmanaged code and I’m not sure where to start with replacing things like the main menu and toolbars.

Or is there another option here I’m not seeing?

Any suggestions or links to information on this topic would be appreciated.

Update: DavidK raised some excellent questions so I’m adding the motivations behind this.

1) Future development of the product

This product is still being actively developed with new features getting added on a regular basis. I thought that it would make a lot of sense to try and slowly migrate towards C#/WPF. In my limited experience with C#/WPF I found the productivity gains to be amazing over working in C++/MFC.

The other big thing we’re getting with WPF is the ability to take advantage of multi-head systems. MFC applications are limited to a single top level frame, making it very difficult to leverage multiple monitors.

2) Employee retention and recruitment

It’s getting harder and harder to find developers who are willing to work on MFC. It’s also important for the career development of the current developers to get exposure to newer technologies.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:33:27+00:00Added an answer on May 22, 2026 at 8:33 pm

    Revisiting this because I have successfully replaced our top level MFC UI (the main frame, windows, and toolbars) with WPF.

    As it turns out, our core drawing code merely needs to be handed an HWND to render into. This made it really easy to reuse the bulk of our existing C++ codebase.

    Here’s a quick rundown on the key pieces of the approach I took:

    • Used the .NET HwndHost class to host an HWND for the C++ drawing code to render into
    • Created C++/CLI wrappers for any native C++ code that needed to be exposed to the WPF/C# UI code
    • Left most of the MFC dialogs as-is in the native C++ code. This minimizes the amount of work needed to finish the UI. The MFC dialogs can be migrated to WPF over time.

    As a side note, we’re using SandDock and SandRibbon from Divelements and have been very happy with them so far.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a very large, data-intensive legacy application. Both the code base &
I am working on a very large application that has multiple processes running simultaneously;
I'm currently working on a very large project, and am under a lot of
We're currently working with a vendor-provided WSDL schema that is very large. The binding
I'm currently working on a very short project on Prolog, and just got stuck
I'm currently working on an internal sales application for the company I work for,
I'm currently working on a legacy app (win32, Visual C++ 2005) that allocates memory
I'm currently working on a legacy system using Oracle's ADF Faces JSF implementation for
I am currently working on a very specialized PHP framework, which might have to
I'm currently working on refactoring a large amount of CSS, and a common trend

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.