What is the API to “create applications like Flip3D”

冷暖自知 提交于 2019-12-19 06:18:12

问题


I am trying to figure out how to use DWM to render a copy of a Window into my own desired location. The only thing I can find to tell DWM to render somewhere is with the thumbnail APIs.

But MSDN's DWM Thumbnail Overview they specifically warn me off:

Note DWM thumbnails do not enable developers to create applications like the Windows Vista Flip3D (WINKEY-TAB) feature. Thumbnails are rendered directly to the destination window in 2-D.

I am told that the thumbnailing api cannot be used to create applications like Flip3D, but they don't say which api can be used to create applications like the Windows Flip3D.

So what API can be used to create applications like the Windows Vista Flip3D?


Background

With Windows Desktop Composition running, applications draw their window client-area's onto their own private buffer. (This contrasts with previous versions of Windows where every application drew directly on the screen). This client area image is then placed in a frame (the title bar, minimize, maximize, restore buttons, etc) and then drawn (i.e. composited) onto the desktop - along with all the other windows that are open:

Because this buffer is private, and because graphics cards in the last few years have become powerful at performing 3D tasks, Windows can then start to perform some neat tricks. One of them is to be able to manipulate the client window, performing scaling and perspective changes to it. This allows the live "thumbnail" api - where Windows will draw a thumbnail size copy of a window where you tell it to. Since this is all happening in the hardware, it is very fast.

The other ability is the Flip3D (Win+Tab). The compositor can perform 3d positioning of a window. Again, because this is all done in hardware it is very fast.

I have found the API to tell the Desktop Window Monitor to draw me a thumbnail of an application "here":

//Register a thumbnail we want
DwmRegisterThumbnail({in}hwndDestination, {in}hwndSource, out thumbnail);

// Start displaying the thumbnail
DwmUpdateThumbnailProperties({in}thumbnail, {in}thumbproperties);

But I cannot find the API to tell the DWM to draw me the full-size version of a window.


Edit: You can't blame Microsoft for copy protection in Windows:

  • Licensed Products as shipped shall comply with the Compliance Rules and shall be designed and manufactured in a manner that is clearly designed to effectively frustrate attempts to modify such Licensed Products to defeat the content protection requirements of the HDCP Specification and the Compliance Rules.

  • Licensed Products shall be designed and manufactured in a manner that is clearly intended to effectively frustrate attempts to discover or reveal Device Keys or other Highly Confidential Information

  • Licensed Products shall use at least the following techniques, in a manner that is clearly designed to effectively frustrate attempts to defeat the content protection requirements of the HDCP Specification and the Compliance Rules

You have to blame Sony.


回答1:


Take a look at this project: https://github.com/gratianlup/SmartFlip. It uses WPF and the Thumbnail API.



来源:https://stackoverflow.com/questions/3848558/what-is-the-api-to-create-applications-like-flip3d

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!