Microsoft Foundation Classes (MFC)

MFC (Microsoft Foundation Classes) is a C++ class library for building Windows desktop applications, originally introduced in 1992. It is typically used with Microsoft Visual Studio, which provides project wizards to generate an MFC application skeleton.

MFC applications are commonly organized around the Document/View architecture:

  • The Document part manages the application’s data and business logic.

  • The View part handles the visual representation of that data.

User interactions (button clicks, mouse events, menu commands, etc.) are processed through the Windows message mechanism, with MFC offering a convenient way to route and handle events (message maps).
MFC also supports serialization, which can be used to save and restore object data.

MFC is well documented through Microsoft’s official documentation (formerly known as MSDN). Recent versions also allow developers to build more modern UIs, including Ribbon-based interfaces.

Qt

Qt is a cross-platform C++ framework for building graphical applications, first released in 1995. The typical development tools include Qt Creator (IDE) and Qt Designer (UI design tool).

Qt is widely appreciated for its clean API and its core communication mechanism: signals and slots, which make it easy to connect UI events to application logic.

A major advantage of Qt is portability: applications can be built for Windows, macOS, and Linux (and more, depending on the modules used). In contrast, MFC applications run only on Windows.

Qt is available under both open-source and commercial licenses. Commercial distribution may require a paid license depending on how you use and distribute Qt (so it’s important to review the licensing terms for your specific case).

Migrating from MFC to Qt

Converting an MFC application to Qt typically involves more than a simple port. You usually need to:

  1. Rework the architecture, especially if the project heavily depends on MFC’s Document/View model.

  2. Rewrite the UI (dialogs, menus, toolbars/ribbons, shortcuts, and event handling).

  3. Replace Windows/MFC-specific patterns (message handling, MFC UI controls, etc.) with Qt equivalents (widgets, signals/slots, models).

In most real-world cases, it becomes a partial rewrite, particularly on the UI side.

Conclusion

Qt’s main strengths are cross-platform support and the ability to create modern user interfaces with a powerful framework. MFC, on the other hand, remains relevant for Windows-only applications, especially when maintaining an existing MFC codebase or when a team already has strong MFC experience.

Ultimately, you should choose MFC or Qt based on your project requirements: platform targets, UI expectations, maintenance constraints, team skills, and licensing considerations.

Request for a Quote