I'm learning to host a browser in my WinApi application using MSHTML and it's IWebBrowser2 and IHTMLDocument2. The first problem is blurry text, the left part of a picture is my app, and the right part is IE:
11001: Internet Explorer 11. Webpages are displayed in IE11 edge mode, regardless of the declared !DOCTYPE directive. Failing to declare a !DOCTYPE directive causes the page to load in Quirks.
11000: IE11. Webpages containing standards-based !DOCTYPE directives are displayed in IE11 edge mode. Default value for IE11.
10001: Internet Explorer 10. Webpages are displayed in IE10 Standards mode, regardless of the !DOCTYPE directive.
10000: Internet Explorer 10. Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode. Default value for Internet Explorer 10.
9999: Windows Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the declared !DOCTYPE directive. Failing to declare a !DOCTYPE directive causes the page to load in Quirks.
9000: Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode. Default value for Internet Explorer 9. In Internet Explorer 10, Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode.
8888: Webpages are displayed in IE8 Standards mode, regardless of the declared !DOCTYPE directive. Failing to declare a !DOCTYPE directive causes the page to load in Quirks.
8000: Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode. Default value for Internet Explorer 8. Important In Internet Explorer 10, Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode.
7000: Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode. Default value for applications hosting the WebBrowser Control.
Obviously, the browser control can only support a document mode that
is less than or equal to the IE version installed on the client.
Using the FEATURE_BROWSER_EMULATION key works best for enterprise line
of business apps where there is a deployed and support version of the
browser. In the case you set the value to a browser mode that is a
higher version than the browser version installed on the client, the
browser control will choose the highest document mode available.
If FEATURE_BROWSER_EMULATION is omitted some !DOCTYPE directives (e.g <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">) could activate old IE 7.0 emulation with many drawbacks (e.g. worse CSS support).
Your screen setting looks like 150% scaling so make sure that application is marked as DPI aware (edit manifest or select option in IDE).
In
IDocHostUIHandler::GetHostInfoimplementation addDOCHOSTUIFLAG_DPI_AWAREtodwFlags.Edit:
FixIeCompatModesets WebBrowser emulation mode. Depending on value assigned tofix_versionWebBrowser emulates different versions of IE.Internet Feature Controls
What Happens if I Set the FEATURE_BROWSER_EMULATION Document Mode Value Higher than the IE Version on the Client?
If
FEATURE_BROWSER_EMULATIONis omitted some !DOCTYPE directives (e.g<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">) could activate old IE 7.0 emulation with many drawbacks (e.g. worse CSS support).You can check it (or delete) with regedit.