I am working on a post or two on the subject of WPF Interop with ATL and Windows Forms.
I would like to demonstrate:
- ATL Simple Control in a WPF Window
- ATL ActiveX in a WPF Window
- Windows Form user control in a WPF Window
- WPF control in a Windows Form
However, I encountered an unexpected setback: Its very difficult to create ATL projects with Visual Studio 2010 Beta 1!
- The ATL Wizard doesnt add implementations in the control to methods you add to the interface.
- When implementing connection points, methods of the event interface are not added to the idl, nor are they implemented in the proxy code for the event interface.
Actually, there have been problems with the ATL Wizard since the CTP (see here).
So, I thought, I will overcome the problem by downloading the completed samples from the MSDN. I tried the Polygon sample and I got a second surprise.
These samples were written for Visual Studio 2005. I loaded the Polygon sample into Visual Studio 2010 Beta 1 and the conversion failed : (
Well, I dont have a copy of 2005 (I keep VC 6.0 because there are so many things it does better than any of the later IDEs). So I tried Visual Studio 2008.
This time the conversion worked, but I couldnt get the project to compile. Whatever I did it would report “Skipping compile” and do nothing ….
Well, I intend to resolve this problem in the next few days, and then demonstrate the interoperation with WPF…