One simple solution is to create a CLI/Interop DLL compiled with /clr, this DLL can export standard C function, which the C++ code can call. When implementing the standard C functions in the CLI/Interop DLL , then one is able to call standard .NET code, and it is possible for the CLI/Interop DLL to have references to other standard .NET assemblies. This example hosts a WinForms control in a MFC application, but one could just aswell host a WPF control: WinFormIntegration Sample: Demonstrates Hosting a WinForms User Control in an MFC Application [^]
modified on Friday, February 25, 2011 10:47 AM