Fusion App Basic Mechnism (updating)
时间:2010-10-27 来源:能巴
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?