質問

I have a C++ aplication that is using the IWebBrowser2 interface for rendering some online html pages. The problem is that when accesing a certain link I receive a javascript error, although if I am accesing that same page using Internet Explorer, the page loads with no error. The recived error in my application is "Object doesn't support this action"

I was able to hide the error by using the put_Silent() method and setting it to VARIANT_TRUE, but this is not a solution as the content displayed is not correct.

I know that IWebBrowser2 is using the Internet Explorer engine to load the pages, so I guess that there is a way to fix this problem as the page loads ok in IE.

役に立ちましたか?

解決

You may have to implement IDocHostShowUI::ShowMessage.

When your application hosts the browser control, you can replace the Windows Internet Explorer message box caption (which is used for Microsoft JScript alerts among other things) with a custom caption

I think you would want to return S_FALSE.

S_FALSE Host did not display its UI. MSHTML displays its message box.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top