Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

stu_pb

ActiveX and DirectX

This topic is 5290 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

Lets say I wanted to create an HTML page with and ActiveX control embedded in it that would be able to render DirectX graphics. Does anyone have any tips on how to go about doing this? I should probably be working now...

Share this post


Link to post
Share on other sites
Advertisement
1) Unless this was a personal technical experiment, I probably wouldn''t re-invent the wheel and use an existing solution: http://www.wildtangent.com/default.asp?pageID=developer_main


2a) Unless you''re extremely competent with COM and OLE/ActiveX and what all of the interfaces associated with embedding in particular are and do (IOleInPlaceObject for example), then making a *fully featured* and *well behaved* control with plain Win32 will be quite painful.

2b) Using the MFC ActiveX Control Wizard is the easiest way to take most of the pain away for getting the control itself up and running. If you really don''t want to use MFC (I''d advise using it, even for a prototype), ATL will take a little bit of the pain away.


3) The best way to approach your problem is to split the tasks up and tackle them separately - I see three listed in your request: *1* make an ActiveX control *2* make the ActiveX control work in a web page *3* make the ActiveX control render DirectX graphics output. I would tackle the problems in that order.


4a) For tasks 1 & 2, I''d use MFCs ActiveX control Wizard and set up a window area of the browser for DirectX output - possibly subclassing something like a static control.

4b) Once you have all of the browser interaction working as expected and a window reserved for the DirectX output, then you can set about displaying the content. Take a look at the MFCTex and MFCFog samples in the DirectX SDK to see how to make DirectX output work within an MFC app - getting the HWND of an ActiveX control in a browser shouldn''t take much more work.


Simon O''Connor
Game Programmer &
Microsoft DirectX MVP

Share this post


Link to post
Share on other sites
I''ve done something very much like this with OpenGL. I got stuck when it came to accessing the arguments specified for the html tag, though (so I could give it a source URL), so if you find out how to do that, I''d be interested.

Share this post


Link to post
Share on other sites

  • 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!