Fusion App Basic Mechnism (updating)

We are developing a app called Fusion. It's a strange app, as: it's a MFC app while internally MFC app is just its clothes and it makes use of C++/CLI and mainly C# assemblies to do the real job. Its startup mechanism can be summarized as:

1. Firstly, there is a application project in C++ which contains the real MFC FusionApp inherited finally from CWinApp and it give birth to the final app Fusion.exe. As a MFC app does, when running Fusion.exe, the global FusionApp object will be created firstly, but it actually itself does nothing but: create a C# application object which actually does the app startup work.

2. About message handling, as the app is a MFC app, so every message / event happened on the App UI will firstly be a MFC message. But internally, by C++/CLI, all need-to-handle messages will be redirected to the internal dotNet based event manager and trigger dotNet event instead, and trigger dotNet event handlers registered to finally react to the UI messages. Isn't it cool?

你可能感兴趣的:(APP)