Windows Shell 扩展教程

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/140312/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 11:19:13  来源:igfitidea点击:

Tutorial for Windows Shell Extensions

windowsshell-extensions

提问by Gustavo Carreno

I've been postponing this part of the project because I haven't found any particular helpful example/tutorial for these 2 aspects of Shell Extensions:

我一直在推迟项目的这一部分,因为我还没有找到有关 Shell 扩展的这两个方面的任何特别有用的示例/教程:

  1. Return information for the Hint when you hover over a file.
  2. Context pop-up menu with extension context, if it makes sense.
  1. 当您将鼠标悬停在文件上时,返回提示信息。
  2. 带有扩展上下文的上下文弹出菜单(如果有意义的话)。

Cheers.

干杯。

回答by Shog9

Ah, you lucky boy. You get to read Mike Dunn's excellent series of tutorials:
The Complete Idiot's Guide to Writing Shell Extensions

啊,你这个幸运的孩子。您可以阅读 Mike Dunn 的优秀系列教程:
编写 Shell 扩展的完整白痴指南

Parts I and III should be of particular interest to you.

您应该对第一部分和第三部分特别感兴趣。

回答by splattne

Look at this CodeProject article:

看看这篇 CodeProject 文章:

Namespace extensions - the undocumented Windows Shell

命名空间扩展 - 未记录的 Windows Shell

This article explains how you can easily create a namespace extension with lots of features without doing lots of work by using some undocumented shell functions. The most noticeable function is SHCreateShellFolderViewEx, which creates the view for you and creates all interfaces you need for displaying the contents of your folder. You can modify the behaviour of the folder by implementing a callback function. This is how Microsoft implements its own namespace extensions.

本文解释了如何使用一些未记录的 shell 函数轻松创建具有许多功能的名称空间扩展,而无需做大量工作。最引人注目的函数是 SHCreateShellFolderViewEx,它为您创建视图并创建显示文件夹内容所需的所有界面。您可以通过实现回调函数来修改文件夹的行为。这就是 Microsoft 实现自己的命名空间扩展的方式。

回答by ConcernedOfTunbridgeWells

VB Shell Programmingmostly concentrates on VB but the descriptions of the APIs are applicable to pretty much anything that speaks COM.

VB Shell 编程主要集中在 VB 上,但 API 的描述几乎适用于任何说 COM 的东西。