How does Office 2013 implement black windows for IRM?

前端 未结 1 1093
时光取名叫无心
时光取名叫无心 2020-12-11 22:15

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 scre

相关标签:
1条回答
  • 2020-12-11 22:21

    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);
    

    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.

    0 讨论(0)
提交回复
热议问题