Office 2013如何为IRM实现黑色窗口? [英] How does Office 2013 implement black windows for IRM?

查看:187
本文介绍了Office 2013如何为IRM实现黑色窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到,当在Outlook 2013中打开受IRM保护的电子邮件时,按PrntScrn时,将屏幕快照粘贴到mspaint中时,电子邮件窗口将替换为黑色实心矩形.

I noticed that when I press PrntScrn while an IRM-protected email is open in Outlook 2013, the email's window is replaced with a solid black rectangle when I paste the screenshot into mspaint.

我不知道任何截屏"窗口消息会发送到Windows,因此该功能如何实现?我的显示器上从未见过任何黑色像素,因此我认为它没有键盘钩来监听PrntScrn,然后将窗口涂成黑色.

I'm not aware of any "Screenshot" window message being sent to windows, so how is this feature implemented? I never see any black pixels on my monitors so I don't think it has a keyboard hook to listen for PrntScrn and then paints the window black.

推荐答案

使用WinAPI函数

Using the WinAPI function SetWindowDisplayAffinity with the WDA_MONITOR affinity before showing the window.

SetWindowDisplayAffinity(hwnd, WDA_MONITOR);  // Should, of course, check return value
ShowWindow(hwnd, SW_NORMAL);

请注意,这仅适用于Windows 7及更高版本,仅适用于某些公共操作系统功能和API"集,并且仅当该窗口是DWM合成的时才适用.请参阅链接文档的备注部分中的两段.

Note this only works in Windows 7 and higher, only for a certain set of "public operating system features and APIs", and only when the window is DWM-composited. See the two paragraphs in the Remarks section of the linked documentation.

这篇关于Office 2013如何为IRM实现黑色窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆