Question

I'm a newbie to CHtmlView of Visual C++ programming. I need to make a web-browser application display website by IHTMLDocument2 interface which will need to download activex control from website and run it automatically. Here is the problem, the application which I have made is running well except the activex control on the website is not running. I have checked the interface of IHTMLDocument2 and also have override OnAmbientProperty to setup the flag to zero when dispid value is equals to DISPID_AMBIENT_DLCONTROL, but it still not load activex control on the website which are browsing by using My own web-browser app.

Can anyone tell me which document should I looking for? I'm so confusing about how to setup the security level on my own web-browser application to enable activex.

Thank you very much!

Was it helpful?

Solution

Making it work with MFC might be a bit tedious task. You would need to create a custom implementation of COleControlSite and COccManager for your CHtmlView. On the COleControlSite object, you'd need to implement IServiceProvider and IInternetSecurityManager. With IInternetSecurityManager::ProcessUrlAction you'd control how ActiveX controls are handled. Here you can find some implementations of the above:

http://www.codeproject.com/Articles/4805/Advanced-customization-of-WebBrowser-Control-in-Di

http://www.codeproject.com/Articles/924/DHTML-User-Interface-Library

http://shareaza-code.googlecode.com/svn/trunk/CtrlWeb.cpp

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top