IE ZOOM

设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 New for Internet Explorer 8

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值