Embedding an Internet Explorer control - C++ WinAP

2020-01-31 04:30发布

问题:

How can I embed an Internet Explorer control into my application using C++/WinAPI?

I swear I have searched; I can't find any documentation on this.

回答1:

I've been searching for this too, some useful links:

IWebBrowser2: how to force links to open in new window?

http://www.codeproject.com/Articles/1788/Loading-and-parsing-HTML-using-MSHTML-3rd-way

http://www.codeproject.com/Articles/3919/Using-the-WebBrowser-control-simplified

From what I remember it was most useful to implement the IHTMLDocument interface instead of the full web browser.

Good luck!



回答2:

Try these:

  • Embed an HTML control in your own window using plain C
  • Programming the MSHTML Web Browser Control with C++

Since interacting with controls such as these requires COM/COM+ programming, you could also benefit from learning those methods as well.