Screen capture ignores some windows

回眸只為那壹抹淺笑 提交于 2019-12-06 03:51:24

问题


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.

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.

An ideas?

Thank you.


回答1:


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




回答2:


This could be because of desktop composition. Turn off the Aero desktop composition in Vista and try it again.



来源:https://stackoverflow.com/questions/1193335/screen-capture-ignores-some-windows

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