I'm trying to get a MFC/C++ application on Win8.1/IE11 with an embedded browser window to render in edge
(most recent standards) mode. The content for the window is served locally (i.e. not from a web site).
Using <!DOCTYPE html>
and <meta http-equiv="X-UA-Compatible" content="IE=edge">
(first thing) in the head gets me IE8 rendering (it's IE5 with neither, IE7 with just DOCTYPE).
I'm aware of the registry setting HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer
for adding your own process name to Main\FeatureControl\FEATURE_BROWSER_EMULATION
... this in fact works and it renders in IE11 with one major problem: the application happens to be named identically to a Microsoft application which breaks when I set that feature! It seems that the registry setting feature doesn't allow for a full path name to a process either. I know, rename the process... but I can't easily do that for a variety of historical reasons. So...
I have extended the handler class MyDocHandler : public IDocHostUIHandler2, public IOleClientSite {...}
and use it via pOleObject->SetClientSite( pMyDocHandler );
before any navigation happens. I implemented IDocHostUIHandler2::GetOverrideKeyPath
which is called as expected and I return my own application key path (nearly identical to Microsoft's, i.e. Software\MyCompany\Internet Explorer
instead (also tried just Software\MyCompany
). I've put the registry setting in place under that path, e.g. my Software\MyCompany\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION\MyProcess.exe
but it seems to be ignoring it. I've tried a few different registry path options as well but I'm out of ideas. Oh, I also tried without success using GetOptionKeyPath
.
Additionally I've gone so far as trying the HookRegOpenKeyExW
hack suggested in another question but there are now apparently several additional stub library compatibility layers making that even more unwieldy.
Anyone got some insight? Thanks