Screen capture ignores some windows

2019-04-08 16:45发布

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.

2条回答
淡お忘
2楼-- · 2019-04-08 17:06

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

查看更多
欢心
3楼-- · 2019-04-08 17:14

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

查看更多
登录 后发表回答