Jump to content
  • Advertisement
Sign in to follow this  
unicorn11

is it possible to insert a browser window into Directx

This topic is 4527 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 javascript ..)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!