IE“每个浏览器"资源管理器栏 [英] IE "per browser" explorer bar

查看:139
本文介绍了IE“每个浏览器"资源管理器栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以在IE中创建按浏览器"浏览器栏,这意味着所有打开的选项卡都共用一个浏览器栏?遵循MS准则创建的资源管理器栏是每个选项卡",这意味着在每个新选项卡上都会打开一个新的资源管理器栏.另外,是否有一种方法可以在内置的按浏览器"浏览器栏(收藏夹",馈送",讨论"等)中显示HTML文档?

Is there a way to create a "per-browser" explorer bar in IE, that means an explorer bar common for all open tabs? The explorer bars created following MS guidelines are "per-tab", meaning that a new explorer bar is opened on each new tab. Alternatively, is there a way to display an HTML document inside one of the built-in "per-browser" explorer bars - "Favorites", "Feeds", "Discuss" etc.?

推荐答案

没有内置的方法.资源管理器栏的可扩展性模型规定了资源管理器栏和选项卡之间的1:1比率.原因很多,并且通常与从IE6到带有Tabs的现代Web浏览器的最简单途径有关.考虑一下基于OLE的体系结构:对于初学者来说,您具有由IObjectWithSite设置的站点对象.您可以使用该网站查询IWebBrowser2,当前的IHTMLDocument2等内容.扩展通常会在获取这些指针时缓存它们.因此,您需要这种1:1对应.

There is no built-in way of doing this. The extensibility model for Explorer bars dictates a 1:1 ration between Explorer bars and Tabs. The reasons for this are many, and often have to do with the easiest path for getting from IE6 to a modern webbrowser with Tabs. Think about the OLE based architecture: for starters, you have your site object, set by IObjectWithSite. You use the site to interrogate for things like IWebBrowser2, the current IHTMLDocument2, etc. Often extensions cache these pointers when they get them. Thus you want this 1:1 correspondence.

如果您想拥有一个实例资源管理器栏,则可以这样做,但这将涉及重新为子窗口的父窗口跨进程进行父处理,以及一堆基于BHO的代码以使IE的窗口状态正确无误.最好让状态易于序列化,处理DWebBrowserEvents2 :: WindowStateChanged并对其进行伪造.

If you want to have a single instance explorer bar, you could do it, but it would involve re-parenting child windows cross process, and a whole bunch of BHO-based code to get IE's window state just right. You're better off making your state easily serializable, handling DWebBrowserEvents2::WindowStateChanged and faking it.

这篇关于IE“每个浏览器"资源管理器栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆