Awesome video and very timely. I'm currently involved in trying to drag a 16 year old MFC application kicking and screaming into the WPF present and future.
can you please post a sample showing how to change a C++ control to WPF ?
Any specific scenario? A MFC UI element with a bunch of existing logic, switched over to a WPF front end?
Yes ... and moreover, best practices to follow. You can put it in the comments or a readme.txt file along the sample. Can you please talk or write about some ownerdrawn controls switching over scenario? Thanks
Was it slow as molasses after the conversion with all of the WPF bloat, sort of like Visual Studio 2010?
Nice to see you're running Windows XP in the background, though. I found that highly amusing in a post about converting legacy code.
XP was in a VM if I recall correctly. He also had Windows 7 on his main machines. There's no rule against keeping machines for testing or verification. Note it was running "in the background"
The slowdowns in visual studio had nothing to do with WPF. Check out the Visual Studio blog for more information. While WPF was the most visible change, a ton more was changed under the covers.
Happily, with the RC, VS2010 is doing quite well now, with lots of new and useful features and perf on par with the previous version.
if you are planning to post a sample and the best practice notes... could please notify me or tell me where I can expect it to show up !!!
If you grep for HwndSource and in particular the "AddHook" tweak you'll get a long way with your MFC / WPF mash-ups. There are some pain points about using RenderTargetBitmap and then converting the resulting bitmap to a MFC compatible 24 bit RBG bitmap form that you can say put into a MFC ribbon - but it's all very doable. If you're not using Dev 10, i.e. you're using Visual Studio 2008 then I'd recommend doing your work in a 32 bit environment, you're going to be stepping a lot between C++, C++/CLI and C# and you will want mixed-mode debugging. I couldn't imagine doing this stuff in 64 bit before the advent of mixed-mode.
If you want your business application to resemble an ATM machine, you will use WPF. If you want it to look professional (i.e., like office), you will use MFC and a good toolkit such as Codejock for ribbons and views.