Question

How do you create a transparent window that can be placed over another window that is actively having streaming video drawn to it. I want to create a window on top of the video window that I can draw on without video constantly drawing back over it.

I can create a window from a transparent dialog resource and set its z-order using SetWindowPos(...) but it doesn't seem to have any effect. Having the dialog set as a WS_CHILD style or WS_POPUP also appears to have no effect.

I'm using a media (video) framework another development group in my company developed and am providing a window handle to that code. That handle is being used by their rendering plugin in the pipeline that uses Direct3d for rendering the video on that window surface.

Was it helpful?

Solution

Video is rendered to a hardware overlay in the video adapter. You'll need to create your own to overlay that overlay. I think DirectX provides that capability, you can also get it by using the WS_EX_LAYERED window style and the SetLayeredWindowAttributes(). Which you'll need to set the transparency key. Not so sure that's a slam-dunk btw, I've seen this behave oddly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top