1
votes

I'm attempting to host a web browser inside a dialog. I am using C++ with Win32 and ATL, no MFC. There is an ActiveX control (IWebBrowser2) that implements this functionality. The trick is it appears as though I need to create a dialog class that implements dozens of COM member functions to accomplish this. Is there no easier way? I've been looking at ATL (not I cannot use MFC otherwise I would use CDHtmlDialog) but haven't found any answers.

2
Do you have any code to share?Roman R.
Check this out - assembla.com/code/roatl-utilities/subversion/nodes/trunk/…. This is ATL+WTL too, and the code snippet is very compact. Basically you need CAxDialogImpl and sink interface.Roman R.
I really like your code Roman! Unfortunately I cannot bring in a dependency on WTL. :(I have no cat
There is little from WTL in this code fragment, all the important classes are from WTL (CAxDialogImpl, IDispEventImpl).Roman R.

2 Answers

0
votes

Here's a CodeProject article that demonstrates the process: http://www.codeproject.com/KB/wtl/wtl4mfc6.aspx

It assumes you'll be using WTL but I think it could be used with only ATL. WTL is an extension of ATL.

0
votes

Here is an excellent tutorial on how to accomplish exactly what I am trying to do. Specifically it explains how to create a Dialog using ATL but not WTL or MFC that hosts a web browser (via IWebBrowser2).

http://www.arstdesign.com/articles/Win32_dialoghelpers.html