How to get Internet Explorer in a wxWidgets application?

Currently using wxHTML to display a remote web page in a C++ Windows wxWidgets based application.

However, I need more advanced features like rudimentary CSS styling and JavaScript. The easiest way, I guess, would be to embed Internet Explorer. Keeping the .exe size of the application small is key, so I don't think wxWebConnect is a good fit.

How can I do this? I found some references to using ActiveX to embed IE in a wxWidget application, but I'm unable to find any examples or documentation, or anything.

Update: The reason why it is using wxWidgets are historical. Cross-plattform issues is no concern, it should only run in Windows.


I've done precisely this. It's fairly straightforward. Essentially, you host the MSHTML ActiveX control. Internet Explorer takes that control, and adds buttons, a history, new window functionality, tabs, etcetera. However, all the rendering, DOM, and Javascript parts are handled by the MSHTML component.

The wxActiveX component will take care of the practical bits of ActiveX hosting. wxIE apparently is a derived class that combines the wxActiveX widget with the MSHTML control, and adds a bit of polish. YMMV.

One of the main reasons for using wxWidgets over certain other widget libraries is that wxWindows is cross-platform compatible. Embedding IE would destroy that.

This means that (a) it's probably not a great idea (even if you're not writing for cross-platform now, you may change your mind in the future), and (b) you won't find many other people doing it, so tutorials and examples will be hard to come by.

My suggestion would be to consider a cross-platform browser instead of IE; Firefox seems like the obvious choice.

With that in mind, I did a quick google for you and came up with this, which seems like it may be a solution for you:

Hope that helps.

[EDIT] Of course, a Firefox-based widget would give you much better CSS/JS/HTML rendering than current versions of IE, so that's another good reason to use it instead.

[EDIT] Revisiting this answer because I stumbled upon a Webkit widget, which might also be worth checking out. Here's the link I just found: (I know this doesn't change anything for the OP, but it might be helpful for anyone else who finds this page)

Need Your Help

How to obtain refresh token in OAuth 2.0?

javascript google-chrome-extension xmlhttprequest oauth-2.0

I am writing a Chrome extension which needs to access by OAuth 2.0. I have key and secret, but not refresh token, so every time I make a XMLHttpRequest, in which the refresh token is unde...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.