通过 WinAPI 截屏(安全)

Screen capture via WinAPI (security)

是否可以确定现在我的屏幕(或我的 C++ 程序的 window)正在被 PC 上的任何 运行 程序捕获?

But you can use SetWindowDisplayAffinity 以保护 window 内容仅在桌面 Window 管理器 (DWM) 正在编写桌面时被捕获或复制。