Take screenshot of desktop when Windows is locked (Win+L)

不打扰是莪最后的温柔 提交于 2019-12-18 06:56:51

问题


I want to take a screenshot of desktop while Windows is locked (with Win+L). Standard methods make a black screen, with code of pixel:

COLORREF color = GetPixel(hdc, x, y);

equal -1. Neither a user mode program nor a service could capture a useful image. Any ideas?


回答1:


GetPixel and BitBlt won't work when the desktop isn't physically displayed on the monitor.

You may have some luck capturing individual windows with PrintWindow. However, not all applications respond to PrintWindow calls the same way, so you may see glitches and/or blackness. You'll also need to capture each window individually.



来源:https://stackoverflow.com/questions/3474805/take-screenshot-of-desktop-when-windows-is-locked-winl

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