views:

328

answers:

1

I need to play animated characters over the screen on Windows. Basically, it will be character video with transparency and only non-transparent parts should be able to accept user input (e.g. mouse clicks), all other events should be passed through to underlying window.

I've made a simple transparent DirectX window with video in it. But I don't know how to make parts of this window "transparent" for user input. So if I clicking on the character, my application should accept this click, if I clicking on the transparent part of the video - click should be handled by the underlying window. How can I make it?

Thanks in advance.

+1  A: 

I assume you mean Direct Show rather than DirectX?

You can do it using the Video Mixing Renderer. As with anything directshow its not, necessarily, easy.

First connect the video to the VMR Filter.
Second, for the animating characters all you need to do is build a simple DirectShow push source filter (Its explained really well in the DirectShow samples) that supplies the animation frames. Third you need to create an IVMRImageCompositor class. You can then use DirectX to composite the images.