The behavior of the SetWindowDisplayAffinity API differs depending on the Windows 10 build version.

영준 최 0 Reputation points
2024-11-07T04:34:36.78+00:00

The behavior of the SetWindowDisplayAffinity API differs depending on the Windows 10 build version.

API: SetWindowDisplayAffinity(hwnd, WDA_MONITOR);

  • Windows 10 1909 (18363.418): Works correctly; when my dialog is captured, it turns black.
  • Windows 10 2004 (19041.1): My dialog is rendered as transparent (it should ideally turn black).
  • Windows 10 21H2: Behaves the same as version 1909.

Updating the OS is not a solution for me, as my clients are not allowed to update Windows. Is there a way to resolve this without updating the OS?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,776 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,666 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.