屏幕捕获忽略一些窗口 [英] Screen capture ignores some windows

查看:117
本文介绍了屏幕捕获忽略一些窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MFC工作,我试图捕获桌面的bmp。
我使用GetDC(NULL)来做到这一点,但似乎它忽略了特殊的皮肤窗口。它似乎忽略用UpdateLayeredWindow绘制的窗口。这种行为似乎只发生在Vista x64和XP。我也试过GetWindowDC与桌面HWND,但结果是一样的。

I am working in MFC and I am trying to capture a bmp of the desktop. I am using GetDC(NULL) to do this but it seems it ignores special skinned windows. It seems to ignore windows drawn with UpdateLayeredWindow. This behaviour seems to be happening only on Vista x64 and XP. I have also tried GetWindowDC with the desktop HWND but the result is the same.

注意:
1)打印屏幕工作。
2)在Vista上,如果我启用Aero屏幕捕获是确定,特殊窗口出现。

NOTES: 1) Print Screen works. 2) On Vista if I enable Aero the screen captures are ok, "special" windows appear. So on Vista it only happens when Aero is disabled.

一个想法?

谢谢。

推荐答案

当调用BitBlt()时,添加CAPTUREBLT标志为捕获分层窗口

When calling BitBlt(), add the CAPTUREBLT flag to "capture" layered windows

这篇关于屏幕捕获忽略一些窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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