Tag: WebBrowser Control
-
Application crash when forcing IE8 rendering mode in webbrowser host
User stephench is reporting that when setting webbrowser rendering mode to IE8 via FEATURE_BROWSER_EMULATION, the app would crash. The web site crashes IE8 too, but IE8 is able to recover and automatically switch to IE7 mode, while a webbrowser host crash in WinInet when switching to the compatibility mode (Note the ReloadInCompatView function on the…
-
How to force popup window to navigate in the same window in a webbrowser control
When clicking on an link that targets a new window, the default behavior of a webbrowser control host application is to open a new window in Internet Explorer. User ben_lai wants to know how to handle the click and navigate to the same window. There are three events that notifies a new window, NewWindow (The…
-
Intercept the download dialog in webbrowser control
User rsd102 looks already find the solution to his question when he posted the question to CSDN, except for one missing piece. The sample he found is for overriding the global download manager, and what he need is a process wide override. It looks like rsd102 is loving research. He found more than he can…
-
How to disable navigation sound in webbrowser control
User kill211 does not like the click sound when he calls WebBrowser.Navigate. He wonders if there is a way to disable it without modifying HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Explorer\Navigating, which has effect on other applications. Unfortunately, the API for disabling sound is introduced in IE7. The FEATURE_DISABLE_NAVIGATION_SOUNDS feature can be toggled using registry or the CoInternetSetFeatureEnabled API. Update: A…
-
Handle NewWindow3 and ShowModalDialog in CHtmlView
CHTMLView does not support NewWindow3 as of MFC 9.0. It is relatively easy to add this support, given the event sink code in atlmfcsrcviewhtml.cpp Add the following into the declaration of the derived CHtmlView class (named CHtmlViewTestView in this example) void NewWindow3( IDispatch **ppDisp, VARIANT_BOOL *Cancel, DWORD dwFlags, BSTR bstrUrlContext, BSTR bstrUrl ); DECLARE_EVENTSINK_MAP()…