I've got a legacy c++ win32 application, and extending it using wpf windows does work.
But what I want to do is have a WPF window as main window, and not just any old window but a prism shell window.
So to my legacy c++ project I want to add a Bootstrapper, shell window, MEF loader, all the bells and whistles. And in there I want to put some commands which open the legacy win32 windows when they are needed.
Now to open WPF windows in a win32 app is simple, I just need to use
System::Windows::Forms::Integration::ElementHost::EnableModelessKeyboardInterop(mywindow);
But how Do I open a win32 window in a WPF app? The win32 window will need a message pump loop, but where do I put this:
MSG msg;
while (GetMessage(&msg, NULL, NULL, NULL))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
Can I just create any new thread for the loop? Or is there an interop helper for this, too?
Or is my idea plain insane?