Using C++/CLI to target WPF Application - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Using C++/CLI to target WPF Application

Description:

Using C++/CLI to target WPF Application C++/CLI In Action 7 .NET Framework 3.0 .NET 3.0 = .NET 2.0 + WinFX ( WPF, WCF, WWF, WCS) Windows ... – PowerPoint PPT presentation

Number of Views:157
Avg rating:3.0/5.0
Slides: 19
Provided by: dev3dNet
Category:
Tags: cli | wpf | application | c | target | using

less

Transcript and Presenter's Notes

Title: Using C++/CLI to target WPF Application


1
Using C/CLI to target WPF Application
  • C/CLI In Action 7? ??
  • ???

2
.NET Framework 3.0? ??
  • .NET 3.0 .NET 2.0 WinFX ( WPF, WCF, WWF,
    WCS)
  • Windows Presentation Foundation
  • WinFX?? ???? ??? UI ?????
  • Windows Communication Foundation
  • ??? ??? App? ??? ???? ?? ??? ????? ??
  • Windows Workflow Foundation
  • Workflow ?? ???? ??? ?? ????? ??, ?? ? ?? ??
  • Windows CardSpace
  • ???? ?? ?? ???? ??, PC ????? ?? ?? ???? ??? ?? ???

3
??? ??
  • ????
  • Windows XP SP 2 ??
  • Windows Server 2003 ??
  • ???? ?? ??
  • .NET 3.0 Framework
  • Windows Vista SDK
  • Visual Studio 2005 extensions for .NET Framework
    3.0, November 2006 CTP

4
What is WPF?
  • Managed Graphical User Interface
  • .NET Framework? DirectX ??? ???? ???
  • User Interface, Application Data, Multimedia,
    Graphic Capabilities? ??? ?? ????? ??

DirectX (MilCore)
.NET Framework
WPF (wraps DirectX and utilizes the .NET
Framework)
WPF Client
5
WPF? ??
  • 2D, 3D Vector Graphics
  • ??(transformation), ????? ?? ??
  • ?????, Rich Text ??
  • XAML ??( declarative programming )

6
XAML? ??
  • Extensible Application Markup Language
  • UI ???? ??? ??? ? ??
  • Editor
  • XamlPad ??? ?? ?? ????? ??
  • Cider WYSIWYG Editor
  • ?? Visual C??? XAML? ?? ???? ??(CodeDOM? ????
    ???? ?? ??)

7
XAML ??
8
?? WPF App ???
  • 1. C WPF ????? ????
  • 2. XAML? ????
  • 3. code-behind ??? ????.

9
XAML ??? ??
Windows1.xaml
Windows1.xaml.cs (code-behind)
XAML Parser
C Complier
Windows1.g.cs
Windows1.baml
Windows1 class in MSIL
Generated Assembly
Resource Section
10
WPF ??
  • ??? ???(?? ??) C ??

11
VC? ???? WPF ??
  • ??? ??
  • XAML? ???? ?? ???? ??
  • XAML? ???? ?????
  • ???? XAML? ????
  • XAML ??? ?? ???? ?
  • C DLL Class ?? ??
  • C ?????? XAML? ???? UI??? ??? C ?????? ????? ??

12
? ?? ?? ??
  • ???? ????
  • ? ???? ??(CLR ? ????? ??)
  • ?? ?? gt ?? gt ??? gt ?? ??? /SUBSYSTEMWINDOWS ?
    ??
  • ?? ?? gt ?? gt ?? gt ??? main?? ??
  • ?? ??(?? ?? gt ?? gt ? ?? ??)
  • System
  • PresentationCore
  • PresentationFramework
  • WindowBase

13
??? ??
  • 1. Window ???? ????.
  • ??? ????? ???? ???? ??? ???.
  • 2. Application ???? ????.
  • App??? ? 1?? ?? ???? ???? ??? ????.

14
XAML ?? ??
  • 1. Window? Control?? ??? XAML ??? ???.
  • 2. XAML?? ?? Control?? ??? Helper ???? ????.
  • Control?? ???? ??? ?? ??? ???? ??.
  • 3. Application ???? ????.
  • ??? xaml ??? ???? Helper ???? ???? ??? ??? ??.

15
C DLL ????
  • 1. C Custom Control Library? ???.
  • XAML? code-behind ??? ????? ?? ????.
  • 2. ? C/CLI ????? ???.
  • 3. ??? 1? ???? ????.
  • 4. 1? ???? ???? Window ???? ??? ??? ??? ????.
  • 5. Application ???? ????.
  • ?? ? 4? ???? ???? ??? ????.
  • 6. ??? ?? ??? ??.. ???????????

16
3?? ?? ??
17
MFC?? WPF Control ????
  • Mixed-mode MFC extension DLL ??
  • Mixed-mode Application ??

WPF Control Library
WPF Control Library
Native MFC Application
Mixed-mode extension DLL
Class that use HwndSource to host the WPF control
Native Application
18
Reference
  • C/CLI In Action
  • Application Code Markup A Guide to the
    Microsoft Windows Presentation Foundation
  • http//www.codeproject.com/WPF/
  • http//msdn2.microsoft.com/en-us/library/ms754130
    .aspx
Write a Comment
User Comments (0)
About PowerShow.com