是否可以捕获带有Windows 7 DWM缩略图的窗口? [英] Is it possible to capture a window with windows 7 DWM thumbnail in it?

查看:351
本文介绍了是否可以捕获带有Windows 7 DWM缩略图的窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始相信您无法使用Windows API.

I am starting to believe that you can do nothing with Windows API.

我有两个窗户.其中有一个DWM缩略图.我想做的是,我希望能够将带有缩略图的窗口捕获到另一个屏幕中. 当我这样做时,使用bitblt会复制缩略图以外的所有内容.它只是在位图中不存在.

I have two windows. One has a DWM thumbnail in it. What I want to do is, I want to be able to capture the screen of the window with the thumbnail into the other one. When I do this, using bitblt, everything is copied except the thumbnail. It just isn't there in the bitmap.

那么DWM渲染如何工作?我的意思是,如果DWM将缩略图直接渲染到注册窗口的DC上,那么我的方法应该可以工作.我很困惑.

So how does the DWM rendering work? I mean, if DWM renders thumbnails directly onto the DC of the registered window, then my approach should work. I'm confused.

谢谢.

推荐答案

DWM不是这样工作的:缩略图的内容永远不会被涂抹到窗口的DC上.相反,当显示桌面时,DWM合成引擎将直接在窗口的内容上方呈现缩略图.

That's not how DWM works: the contents of the thumbnail are never blitted onto the DC of your window. Instead, the DWM composition engine will render the thumbnail directly over the contents of your window when the desktop is presented.

不幸的是,没有(官方)方法可以访问DWM缩略图的图像数据(但是 hack 尝试访问基础顶点数据并将其呈现在DirectX 9中.)

There's no (official) way to access the image data of a DWM thumbnail unfortunately (there is however a hack on the net that tries to access the underlying vertex data and render it in DirectX 9).

这篇关于是否可以捕获带有Windows 7 DWM缩略图的窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆