屏幕截图忽略了一些窗口
我在 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
相关文章