Windows 资源管理器附加组件
SVN 和 Git 等工具如何将自身附加到 Windows 资源管理器,以便它们向右键单击菜单添加选项以及根据文件是否已编辑添加勾号/感叹号?
(我并不追求 Git 或 SVN 特定的信息 - 我只是将它们用作示例)
How do tools like SVN and Git attach themselves to Windows Explorer, such that they add options to the right-click menu as well as adding the tick/exclamation mark based on whether a file has been edited?
(I'm not after Git or SVN-specific information - I just used them as examples)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您想要的称为 Shell 扩展,是进程内 COM 对象,它扩展了 Windows 操作系统的功能。
(来源:csscript.net)
你可以请参阅这些链接
再见。
What you want is called Shell Extensions, are in-process COM objects which extends the abilities of Windows operating system.
(source: csscript.net)
you can see these links
Bye.
Explorer 允许 DLL 注册为 shell 扩展。 shell 扩展可以提供上下文菜单项、图标覆盖和许多其他功能。它通过暴露资源管理器调用的某些 COM 接口(例如在显示菜单或图标之前)来实现此目的。这是 有关 shell 扩展性的 MSDN 主页 -- 尽管奇怪的是,有关上下文菜单和图标覆盖的内容似乎不再存在了 -- 您可能必须尝试 Win32 和 COM 开发下的离线 SDK |用户界面 | Windows 用户体验 | Windows 外壳 | Shell 开发人员指南 |将应用程序集成到 Shell 中。
Explorer allows DLLs to register as shell extensions. A shell extension can provide context menu items, icon overlays and numerous other features. It does this by exposing certain COM interfaces which Explorer calls e.g. prior to displaying a menu or icon. Here's the MSDN home page for shell extensibility -- though oddly enough the stuff about context menus and icon overlays no longer seems to be there -- you may have to try the offline SDK under Win32 and COM Development | User Interface | Windows User Experience | Windows Shell | Shell Developer's Guide | Integration of Applications into the Shell.
根据您想要的 shell 扩展,它们的实现可能相当复杂。我不知道您在寻找什么,是快速编写一个漂亮的扩展,还是深入了解本质并学习所有实践。
如果您不太关心如何实现,而只是想实现一些想法,请查看此库以编写 shell 扩展...
EZShellExtensions MFC
EZShellExtensions.NET
有很多不同的类型:
- 上下文菜单
- 属性页
- 图标处理程序
还有更多...
他们还有另一个用于编写名称空间扩展的库(显示在 Windows 资源管理器的树窗格中的内容)。
Depending on the shell extension you want, they can be QUITE complex to implement. I don't know what you're looking for, to quickly write a nice extension, or to get in to the nitty-gritty and learn all the hands-on of it all.
If you aren't as concerned with the how, and just have some ideas you want to implement, check out this library for writing shell extensions...
EZShellExtensions MFC
EZShellExtensions.NET
There are a lot of different types:
- Context Menus
- Property Pages
- Icon Handlers
and many more...
They also have another library for writing namespace extensions (things that show up in the tree pane of Windows Explorer).