[IE programming] how to set the rendering mode of the IE8 WebBrowser control (MSHTML)
IE8 has made great changes in the rendering engine, adding a Standard Mode ). Many software are embedded with the IE WebBrowser control (MSHTML. dll) to display webpages. When the user machine is upgraded to IE8, The WebBrowser control will also be upgraded to the rendering engine of IE8.
To ensure that the applications using the WebBrowser control can work the same way as before, the WebBrowser control of IE8 uses the rendering mode of IE7 by default (that is, the Compatible View (Compatible View) mode in IE8 ).
Add the standard mode of IE8 that you want to program the rendering mode of the WebBrowser control. You can set the Registry FEATURE_BROWSER_EMULATION.
Example:
[(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE) \ Software \ Microsoft \ Internet Explorer \ Main \ FeatureControl \ FEATURE_BROWSER_EMULATION]
"MyApplication.exe" = dword 8000 (Hex: 0x1F40)
Myapplicaiton.exe is the EXE file name of your application. 8000 indicates the rendering mode of 8.0. See the following table:
IE8 Standards Mode 8000 (0x1F40) -- IE8 Standard Mode, IE8 default Mode
IE7 Standards Mode 7000 (0x1B58) -- IE7 Compatible View Mode (Compatible View), default Mode of IE8 WebBrowser Control
IE8 Standards Mode (Forced) 8888 (0x22B8) -- IE8 enforces standard Mode and does not try to use compatible view Mode when rendering fails.
From: http://blog.csdn.net/WinGeek/archive/2009/03/25/4022102.aspx