屏幕截图忽略了一些窗口 [英] Screen capture ignores some windows

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

问题描述

我在 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,屏幕截图正常,会出现特殊"窗口.所以在 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天全站免登陆