The invention discloses a method for native integration and playing of PowerPoint PowerPoint in a WPF program, and relates to the technical field of graphical interface and
multimedia integration, and the method comprises the following steps: configuring a presentation mode of a speaker and hiding a media control window; after a window
handle is obtained, a SetWindows Pos API is called to move the window
handle to the position outside the edge of a screen, and only one pixel is left to be visible. The method comprises the following steps: establishing a
Graphics CaptureItem, registering a window as a capture target, and establishing Direct3D 11 equipment and a context which support the BGRA by using D3D11 CreateDevice at the same time; according to the method, a native device is converted into a SharpDX object, then the SharpDX object is converted into a Windows Runtime device, and on the basis of the Windows Runtime device, a multi-thread Direct3D11 CaptureFramePool is created, and a
Graphics CaptureSession is started. And after the registration frame arrives at an event, converting the captured PPT picture into BitmapSource, and displaying the BitmapSource on an Image control of the WPF. Finally, PPT page turning control is achieved through a SlideShowView interface, and in-program complete control over the demonstration progress is completed. According to the method, the original PPT demonstration can be efficiently embedded in the WPF application program, and seamless playing of
multimedia contents such as videos and animations is supported.