Presentation is loading. Please wait.

Presentation is loading. Please wait.

Nick Kramer PRS313 Lead Program Manager Microsoft Corporation

Similar presentations


Presentation on theme: "Nick Kramer PRS313 Lead Program Manager Microsoft Corporation"— Presentation transcript:

1 Nick Kramer PRS313 Lead Program Manager Microsoft Corporation
4/24/2017 5:50 PM Windows Presentation Foundation ("Avalon"): Integrating With Your Win32/MFC Application Nick Kramer PRS313 Lead Program Manager Microsoft Corporation ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

2 How Do I Get There From Here?
4/24/2017 5:50 PM How Do I Get There From Here? Do I rewrite everything? Too much code to rewrite Existing plug-ins Existing controls Existing documents ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

3 Integration! Can use WPF with existing code
4/24/2017 5:50 PM Integration! Can use WPF with existing code WPF inside existing code Existing code inside WPF Integrate at the component level Maximum richness => all WPF ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

4 Rewrite Or Evolve? 4/24/2017 5:50 PM
©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

5 HwndSource and HwndHost
4/24/2017 5:50 PM HwndSource and HwndHost WPF inside hwnd = HwndSource hwnd inside WPF = HwndHost Hwnds can be: Pure Win32, DirectX, MFC, GDI, GDI+, etc. ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

6 WPF inside hwnd HwndSource makes WPF look like a big hwnd
4/24/2017 5:50 PM WPF inside hwnd HwndSource makes WPF look like a big hwnd HwndSource source = new HwndSource(…); source.RootVisual = myWpfStuff; HWND hwnd = source.Handle; ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

7 4/24/2017 5:50 PM WPF inside hwnd ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

8 hwnd inside WPF HwndHost makes hwnd look like a WPF control
4/24/2017 5:50 PM hwnd inside WPF HwndHost makes hwnd look like a WPF control class MyHwndHost : HwndHost { override BuildWindowCore(hwndParent) { return CreateWindowEx(…); } ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

9 DirectX inside WPF 4/24/2017 5:50 PM
©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

10 Mixed App Considerations
4/24/2017 5:50 PM Mixed App Considerations Higher long-term cost, lower initial cost Run in browser Integrate your business logic Using XAML in C++ Airspace & layered windows ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

11 Airspace Each pixel belongs to one hwnd Win32 WPF Win32 WPF DirectX
4/24/2017 5:50 PM Airspace Each pixel belongs to one hwnd File Edit View Help File Edit View Help Win32 WPF Win32 WPF DirectX DirectX ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

12 Airspace – caution! Win32 WPF Win32 WPF DirectX DirectX
4/24/2017 5:50 PM Airspace – caution! File Edit View Help File Edit View Help Win32 WPF Win32 WPF DirectX DirectX ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

13 Layered windows WPF fully supports HRGNs
4/24/2017 5:50 PM Layered windows WPF fully supports HRGNs WPF does not support layered windows (WS_EX_LAYERED) ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

14 Mixed Application Ideas
4/24/2017 5:50 PM Mixed Application Ideas New chrome Faster canvas? New canvas ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

15 Mixed Application Ideas
4/24/2017 5:50 PM Mixed Application Ideas Wizards and help systems Generate HTML => Generate XAML WPF wrapper around an existing control ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

16 4/24/2017 5:50 PM WPF inside MFC ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

17 Summary Can use WPF with existing code Maximum richness => all WPF
4/24/2017 5:50 PM Summary Can use WPF with existing code Maximum richness => all WPF Integration is for components ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

18 Info on hwnd integration
4/24/2017 5:50 PM Info on hwnd integration System.Windows.HwndHost System.Windows.HwndSource Article: Migration and Interop Architecture WPF newsgroup microsoft.public.windows.developer.winfx.avalon ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

19 Information on C++ and managed code
4/24/2017 5:50 PM Information on C++ and managed code microsoft.public.vc.language ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

20 Related PDC Hands-on Labs
4/24/2017 5:50 PM Related PDC Talks (PRS321) Windows Forms: Integrating Windows Forms and WPF (FUN318) Windows Vista: A Case Study Using Win32/WinFX Integration to Light-Up Your Win32 Application on Windows Vista (PRS324) WPF: Using Data in Your WPF Applications (PRS330) WPF: Creating Rich Content Experiences in Your Applications Related PDC Hands-on Labs Moving Win32 Applications to WPF Integrating MFC and Windows Forms ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

21 © 2005 Microsoft Corporation. All rights reserved.
4/24/2017 5:50 PM © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.


Download ppt "Nick Kramer PRS313 Lead Program Manager Microsoft Corporation"

Similar presentations


Ads by Google