• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号
您的位置:首页 > 程序设计 >vc/mfc > 怎样在IE的右键菜单中建子菜单?

怎样在IE的右键菜单中建子菜单?

作者:佚名 字体:[增加 减小] 来源:互联网 时间:2017-06-04

佚名通过本文主要向大家介绍了ie右键菜单变英文,ie浏览器右键菜单,ie右键菜单设置,ie右键菜单管理,ie右键菜单等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: 怎样在IE的右键菜单中建子菜单?
描述:

象Flashget那样,可以在HKEY_CURRENT_USER\Software\Microsoft\Internet
Explorer\MenuExt\下添加一项,使得IE右键增加一项,但是我如果想先添加一个子菜单,再添加我的项,怎么实现呢?


解决方案1:

http://www.goupsoft.com/ezsaveflash
这个软件实现了.

解决方案2:

http://www.pcmag.com/article2/0,1759,1166596,00.asp
You can choose between two strategies. The first approach is to declare your menu entries in the Registry, under the key HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt. This process is described in the MSDN Library (article Q177241). This was the wrong choice for Web Highlighter for two main reasons: First, these menu items can only point to executables or scripts, making communication with the BHO module very difficult. Second, the menu commands cannot be updated (for example, grayed or checked) to reflect current settings. 
The second approach is to implement the IDocHostUIHandler interface in the BHO and use ICustomDoc::SetUIHandler to notify Internet Explorer that the program will display the context menu itself. IDocHostUIHandler::ShowContextMenu is the method used to modify the way the standard context menu is displayed. Unfortunately, Internet Explorer doesn't let you add your own menu items to the existing menu. Either you let Internet Explorer display its own menu, or you replace it completely. There are no other options! 
The solution is awkward, but there was no other choice. Web Highlighter must build a context menu that is a replica of the standard Internet Explorer context menu and then add its own commands to this menu. To do this, Web Highlighter retrieves the IE menu from the resources contained in Shdoclc.dll (this is where the various flavors of the standard context menus reside), selects the relevant menu according to the context, and then adds its own commands. The code of IDocHostUIHandler::ShowContextMenu contains all the details. 
Note that when the replacement context menu is activated, the Internet Explorer window procedure recognizes its own menu items when receiving the WM_INITMENUPOPUP message and updates them according to the context (for example, checking an item or graying it). But any command that is not recognized by Internet Explorer is disabled. This is a very strange and unfriendly way of handling extensions to the WebBrowser control. 
Again, the workaround is awkward, but there is no other solution: Before calling TrackPopupMenu to display the context menu, Web Highlighter subclasses the Internet Explorer window temporarily and handles the WM_INITMENUPOPUP message in a custom routine, where Web Highlighter updates its own menu items. Immediately after the pop-up menu closes, the original window procedure is restored. 
see also
http://blog.csdn.net/jiangsheng/archive/2004/11/07/170742.aspx


分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • 如何获取IE客户区的鼠标右键消息?
  • 怎么屏蔽IE的菜单项?急急急!
  • 如何开发IE右键菜单插件
  • 如何为IE右键菜单添加多级菜单?小弟跪求帮助
  • 如何能在IE的链接上用右键启动我的程序,并取得所点击的链接?
  • 怎样在IE的右键菜单中添加菜单项?
  • 怎样在IE的右键菜单中建子菜单?
  • IE中右键启动程序

相关文章

  • 2017-06-05 在线等!!紧急,WebBrowser控件问题,解决马上100分结贴
  • 2017-06-04 老问题:关于COMinterface
  • 2017-06-04 vc工程的语言转换
  • 2017-06-04 关于USB摄像头视频捕捉
  • 2017-06-04 LocalHost和虚拟目录的?
  • 2017-06-04 关于vc03以后的调度接口和事件接口。
  • 2017-06-05 打算把金山词霸的功能放到网页上,有什么好办法?
  • 2017-06-04 加入头文件还是undeclared是为什么?
  • 2017-06-04 [向jiangsheng提问]难道非得向专家提问才能解答?还是关于动态调整控件尺寸的帖子
  • 2017-06-04 一个关于directshow编译的问题。

文章分类

  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号

最近更新的内容

    • 热泪求助:工作重压下,请大家帮一把。急!急!急!
    • 注册和卸载NT服务的命令是什么呀?
    • 请问MFCACTIVEX中如何实现BHO接口
    • 请教应用SpeechSDK开发DLL
    • 请教高手,如何实现三层结构的数据库管理系统
    • MediaPlayer控件问题?
    • 不能正常通过Dll编译
    • vs2010怎样把atl项目编译成x64?
    • toAlwin_Lee:
    • 新手发贴,问一个COM内幕中的例子

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有