Bypassing WDA_EXCLUDEFROMCAPTURE

271 Views Asked by At

My program consists of a main window that captures the desktop, outputs it and processes it, along with a windowed magnifier control on top of it that applies a color matrix to it. The main window avoids capturing itself by using SetWindowDisplayAffinity() with the WDA_EXCLUDEFROMCAPTURE flag, but this also prevents it from being captured by any other program including the second magnifier window:

Example image

The fullscreen type of magnifier does not exclude any window, but I'm already using it elsewhere. Including the magnifier control within the main window as host also excludes itself and leaves out the initial processing.

Is there a way for certain windows or apps to bypass that flag, or to include the window in question only to certain apps' capture? Or ultimately, a different way to prevent just the main window from capturing itself?

0

There are 0 best solutions below