is it possible to insert a browser window into Directx

Started by
9 comments, last by Evil Steve 17 years, 10 months ago
is it possible to insert a browser window into Directx ?
Advertisement
No.

You would have to write the renderer yourself.

Dave
Doesn't the Source engine use Internet Explorer inside its games?

You can show normal window controls above DirectX (I think, I don't use DX) so the IE control should work too.
I would go with Dave's post... in my experience its difficult to get fullscreen D3D to play nicely with regular windowed applications [smile]

I've not tried it myself, but have a play with IDirect3DDevice9::SetDialogBoxMode() - you might get lucky.

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

We're using Flash in our simulator. I think the method used (I didn't develop this part) is : create a flash window, and display it on top of the DirectX one. It's a bit hackish, but if you catch the right events, it works fine. So I guess the same kind of method can be used for internet explorer.
Humm what about a HTML page? is there a method to render a html page inside a directx screen
Quote:Original post by unicorn11
Humm what about a HTML page? is there a method to render a html page inside a directx screen
Nope. Same reasons and methods as a browser window.
I think you can use the gecko engine (used by firefox) in openGL, I've seen this somewhere on the web. Maybe something similar exists for directX. You could even write your own HTML renderer, it could be possible if you limit yourself to a small subset of HTML (no css, no &#106avascript ..)
It is not complete impossible at all. But it is very tricky and I don’t know how fast it will be as I never try to use this web browser control feature this way.

As you maybe already know the web browser control can give you access to the html document it contains as a IHTMLDocument2 interface. Now things start to get dirty. First we need the body of the document as IHTMLElement. The document contains a get_body method for this. After we have the body we ask it for a IHTMLElementRender interface using the QueryInterface method.

IHTMLElementRender contains a method called DrawToDC that let us draw the current view of the document in a GDI device context. Remeber it is possible to get a DC for a Direct3D Surface object. Because of this it should be possible to transfer the current View of the web browser control to a texture and render it as part of your Direct3D scence.

Unfortunately you have to write the whole hosting code for the web browser control to make it work but if you do this you can even show real pages from the web.
Thats the UBrowser. I need just that but in directx. think it exists??

This topic is closed to new replies.

Advertisement