I'm trying to display a video in Internet Explorer with my own ActiveX control.
I created the ActiveX control and a demo HTML page creating the control using the OBJECT tag (and setting a width/height on it). I can call simple methods on this control through javascript, it works.
I also created a working directshow graph to display the video. The graph contains a "Enhanced Video Renderer" (EVR) renderer filter.
But i am stuck : i can not find a way to link these 2 technologies. Some MSDN doc says the EVR should use WindowLess activation. But this activation requires a hWnd and a rectangle inside the hWnd. My ActiveX is hosted in Internet Explorer, how can i get the hWnd and make the renderer render at the correct position/size in this window ?
Note that I know how to get the object's absolute rectangle in javascript and give it to the ActiveX. But this rectangle may move with the scrollbar ? And how to get this damn hWnd ?
EDIT
It seems the ActiveX needs to implement the IOleInPlaceObjectWindowless interface which has a SetObjectRects methods called by the host, and should query the host for the IOleWindow interface which has a GetWindow method returning the hWnd.
EDIT 2
It seems all you have to do is implmenet IComponent to retreive an ISite host interface on which you can query any service you need.