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.
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:
| Setting | Win32 mechanism | Controls |
|---|---|---|
| Capture exclusion | SetWindowDisplayAffinity + WDA_EXCLUDEFROMCAPTURE | Whether the window appears in screen captures |
| Click-through | WS_EX_LAYERED + WS_EX_TRANSPARENT | Whether mouse clicks pass through to the window underneath |
| Always on top | WS_EX_TOPMOST / SetWindowPos(HWND_TOPMOST) | Whether it stays above normal windows |
| Hidden from taskbar / Alt+Tab | WS_EX_TOOLWINDOW or skip-taskbar | Whether 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
- Open a call with yourself on a second device or account.
- Share your entire screen, not a single window.
- Show the window with the flag set.
- On the receiving side, confirm the window is absent and check for flicker or an empty rectangle.
- 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
SetWindowDisplayAffinityafter the window handle exists and re-apply it if the window is recreated. - Verify the return value. It returns
FALSEif 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.
Related reading
Frequently asked questions
Was this article useful?
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.
More from the blog
How to Hide an App or Window From Screen Share on Windows
Four ways to keep a window off a Zoom, Teams or Google Meet screen share on Windows — from sharing a single window to the OS-level capture-exclusion flag — and which one actually holds up when you share your entire screen.
How Windows Screen Capture Exclusion Actually Works
A technical walkthrough of SetWindowDisplayAffinity and WDA_EXCLUDEFROMCAPTURE — the real Windows API behind windows that stay off screen shares and recordings.
Can CoderPad Detect Cheating? What It Can and Can't See
CoderPad is a shared, browser-based editor where your interviewer watches you type. What it actually records (code playback, paste events, focus changes), what it can't see outside the tab, and why the live human is the real check.
Discussion
No comments yet. Been through an interview like this? Your experience could help the next candidate.