设document.body.style.zoom和ie窗口右下角里的zoom的结果是不一样的,这两个应该不是同一个概念。
command(IWebBrowser2->ExecWB):OLECMDID_ZOOM , OLECMDID_OPTICAL_ZOOM
这些不知道有什么区别。
如何disable zoom,disable touch zoom。
DOCHOSTUIFLAG_DPI_AWARE = 0x40000000
DOCHOSTUIFLAG_DPI_AWARE
Internet Explorer 8. Causes layout engine to calculate document pixels as 96 dots per inch (dpi). Normally, a document pixel is the same size as a screen pixel. This flag is equivalent to setting the FEATURE_96DPI_PIXEL feature control key on a per-host basis.
//下面这段来自老的sdk文档,最新的在线的没有这段了,被DOCHOSTUIFLAG_DPI_AWARE替代了,功能应该是一样的
To preserve compatibility with previously developed WebOCs, Internet Explorer 8 does not render the Web content of WebOCs using Hi-DPI Behavior, which means that all Web content is rendered unzoomed at the 96-DPI default. To take advantage of Hi-DPI behavior in your WebOC, use a Feature Control Key (see: Introduction to Feature Controls) called "FEATURE_96DPI_PIXEL". You can do this by either using the CoInternetSetFeatureEnabled function or by creating a key called "FEATURE_96DPI_PIXEL" in the following registry location:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Internet Explorer/MAIN/FeatureControl
Then, under that key, create a REG_DWORD with 'Name' = '{process name}' (for example, "process.exe") and 'Data' = '1'.
Making the Web Bigger: DPI Scaling and Internet Explorer 8
The optical zoom keyboard shortcuts (CTRL+mouse wheel forward/back, CTRL+PLUS SIGN, and CTRL+MINUS SIGN) are not enabled by default when hosting the WebBrowser control. To enable this behavior, call IWebBrowser2::ExecWB with OLECMDID_OPTICAL_ZOOM, passing 100 in pvaIn. Once set, the keyboard shortcuts remain available as long as the host navigates to HTML content because the same instance of MSHTML is used. However, if the host navigates to Active documents, such as XML or Portable Document Format (PDF) files, optical zoom is disabled and will need to be enabled again.