Skip to main content
Windows DevelopmentStealth & Detection

What Is WDA_EXCLUDEFROMCAPTURE? Capture Exclusion and Click-Through Windows Explained

A concise reference for WDA_EXCLUDEFROMCAPTURE, the Windows display-affinity flag that keeps a window out of screen captures, plus the click-through and topmost window styles it is usually combined with. What each setting does, what it doesn't, and how to test it.

InterviewPilot TeamOctober 17, 20263 min read

Definition

WDA_EXCLUDEFROMCAPTURE (value 0x00000011) is a display affinity constant used with the Win32 function SetWindowDisplayAffinity. A window with this affinity is drawn normally on the physical display but is excluded from capture by APIs that follow the Windows compositor, such as screen sharing and screen recording tools.

SetWindowDisplayAffinity(hwnd, WDA_EXCLUDEFROMCAPTURE);

Why the flag exists

Microsoft added display affinity for content that should be visible to the local user but not captured: DRM-protected video, sensitive dashboards, password prompts, and similar. Applications that want to protect on-screen content from recording call it on their own windows. It's a general-purpose OS feature, which is why mainstream meeting and recording software honors it without any special integration.

How it behaves

  • The window shows on your monitor as usual and you interact with it normally.
  • In a capture or screen share, the window is absent. What lies behind it appears instead.
  • It differs from WDA_MONITOR, which shows a black rectangle in the captured image.
  • Capture software that reads from the compositor (Zoom, Teams, Meet, Webex, OBS display capture) generally honors it. See the platform-by-platform breakdown.

Version requirement

Windows 10 version 2004 (build 19041) or later. On older builds only WDA_MONITOR is available. If you're writing an app, check the OS build at startup and fall back gracefully.

Three window settings people confuse

Capture exclusion often travels with two other settings, which solve different problems:

SettingWin32 mechanismControls
Capture exclusionSetWindowDisplayAffinity + WDA_EXCLUDEFROMCAPTUREWhether the window appears in screen captures
Click-throughWS_EX_LAYERED + WS_EX_TRANSPARENTWhether mouse clicks pass through to the window underneath
Always on topWS_EX_TOPMOST / SetWindowPos(HWND_TOPMOST)Whether it stays above normal windows
Hidden from taskbar / Alt+TabWS_EX_TOOLWINDOW or skip-taskbarWhether it appears in the taskbar and task switcher

A window can have any combination. A click-through overlay is not automatically hidden from a screen share, and a capture-excluded window still blocks clicks unless it is also click-through. In Electron, setIgnoreMouseEvents(true, { forward: true }) provides the click-through part, and a native call sets the capture affinity.

What it doesn't do

  • It doesn't hide a window from a physical camera pointed at your monitor.
  • It doesn't hide the process from Task Manager or system inspection tools.
  • It doesn't cover every capture path. Capture hardware (such as an HDMI capture card) or remote-control tools that work outside the compositor may behave differently.
  • It doesn't affect audio. A microphone picks up what it picks up.
  • It doesn't change how people perceive your behavior in an interview: pauses, eye movement and unnatural phrasing are the more common giveaways.

How to test it yourself

  1. Open a call with yourself on a second device or account.
  2. Share your entire screen, not a single window.
  3. Show the window with the flag set.
  4. On the receiving side, confirm the window is absent and check for flicker or an empty rectangle.
  5. Record the call locally and play it back. Recording and sharing paths can differ.

If you're evaluating a tool rather than writing one, the same test applies. See how to judge "undetectable" claims.

For developers

  • Call SetWindowDisplayAffinity after the window handle exists and re-apply it if the window is recreated.
  • Verify the return value. It returns FALSE if the OS doesn't support the affinity.
  • Treat it as defense in depth for UI you own, not as a security boundary: any process able to read your memory or hook your rendering can bypass it.
  • Test with the meeting apps your users actually use, since each captures through slightly different paths.

For the full mechanism, API walk-through and compositor details, read How Windows screen capture exclusion actually works.

Frequently asked questions

Was this article useful?

Discussion

No comments yet. Been through an interview like this? Your experience could help the next candidate.

You’re posting anonymously — it appears after a quick review. Sign in to post under your name instantly.
0/2000

Bring backup into your next round.

Install InterviewPilot, upload your resume, and walk in with structured answers a keystroke away — visible to you and nobody else.