Document Mode menu functionality in Web Browser Control
I'm writing my own MFC app that uses WebBrowser control (uses IE9). I wonder how can I use the API similar for "the document mode menu" in IE Developer tools : http://msdn.microsoft.com/en-us/library/dd565626(en-us,VS.85).aspx#docModeMenu.
Especially I'm interested开发者_如何学Go in the functionality described as:
"This command allows you to modify the chosen document mode of the current page without modifying the DOCTYPE or META tag in the source"
Is it feasible?
10x,
Guy
It's difficult to tell what you're asking for here, but it sounds like you want to programmatically set the Document Mode (Strict or Quisk) at runtime.
If this is correct, you can't! (At least, programmatically.) The closest thing you can get is to add a Windows registry key that specifies the conditions under which you want pages to load with particular Document Modes. Something like this:
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl
\FEATURE_NATIVE_DOCUMENT_MODE]
"YourApp.exe"=dword:13880
Then, every time your application loads the WebBrowser control it will get access to this registry key and your control logic can decide what to do from there.
Hope this helps. Good luck!
精彩评论