Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'm a developer on an app that has a ton of legacy MFC code, and we have all of your same concerns. A big driver for our strategy was to eliminate as much risk and uncertainty as we could, which meant avoiding The Big Rewrite. As we all know, TBR fails most of the time. So we chose an incremental approach that allows us to preserve modules that won't be changing in the current release, writing new features managed, andporting features that are getting enhancements to managed.</p> <p>You can do this several ways:</p> <ol> <li><p>Host WPF content on your MFC views (see <a href="http://www.codeguru.com/cpp/cpp/cpp_managed/interop/article.php/c14589" rel="nofollow noreferrer">here</a>)</p></li> <li><p>For MFC MDI apps, create a new WinForms framework and host your MFC MDI views (see <a href="http://www.codeproject.com/KB/miscctrl/HostMFC.aspx" rel="nofollow noreferrer">here</a>)</p></li> <li><p>Host WinForms user controls in MFC Dialogs and Views (see <a href="http://msdn.microsoft.com/en-us/library/ahdd1h97.aspx" rel="nofollow noreferrer">here</a>)</p></li> </ol> <p>The problem with adopting WPF (option 1) is that it will require you to rewrite all of your UI at once, otherwise it'll look pretty schizophrenic.</p> <p>The second approach looks viable but very complicated.</p> <p>The third approach is the one we selected and it's been working very well. It allows you to selectively refresh areas of your app while maintaining overall consistency and not touching things that aren't broken.</p> <p>The Visual C++ 2008 Feature Pack looks interesting, I haven't played with it though. Seems like it might help with your issue of outdated look. If the "ribbon" would be too jarring for your users you could look at third-party MFC and/or WinForms control vendors.</p> <p>My overall recommendation is that interop + incremental change is definitely preferable to sweeping changes.</p> <hr> <p>After reading your follow-up, I can definitely confirm that the productivity gains of the framework vastly outweigh the investment in learning it. Nobody on our team had used C# at the start of this effort and now we all prefer it.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload