3

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.

Softlion
  • 12,281
  • 11
  • 58
  • 88
  • Hi Softlion, My scenario is also the same , do you have any working/ reference samples that I can refer for my implementation. In our case we are rendering video using DirectX for windows application, the same native component we are trying to use for IE using ActiveX, I am new to these ActiveX , C++ development and all, also I could not able to find some good samples to support my development . Firebreath is not generating the project templates in windows 8 environment . Please share some code snippets / reference links which was of much helpful. – Mawy Jun 17 '15 at 06:09
  • If you share your activex rendering the video with directx, i'll share mine which renders nicely in IE now. There is no sample at all anywhere on the net. I found one english company which has done the rendering using DirectX but the company seems "offline". Noone answers. – Softlion Jun 17 '15 at 10:01
  • I will share it through the Github link ,can you please share yours also and [provide the link – Mawy Jun 17 '15 at 10:14
  • email https://github.com/softlion – Softlion Jun 17 '15 at 14:07
  • I have posted the sample in the following link code.msdn.microsoft.com/DirectX-Video-Rendering-in-05d63a60 – please post your sample and let me know as soon as possible, Softlion – Mawy Jun 18 '15 at 08:55
  • I would like to send it by email, could you email me ? – Softlion Jun 18 '15 at 12:44
  • I'm using C#. You don't mind ? – Softlion Jun 18 '15 at 13:33

0 Answers0