如何在 Windows 资源管理器工具栏中创建自定义按钮 [英] How to create a custom button in Windows Explorer toolbar

查看:49
本文介绍了如何在 Windows 资源管理器工具栏中创建自定义按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道以编程方式向 Windows 资源管理器栏添加自定义按钮的过程是什么?Windows 7 和 8 有什么不同?

I would like to know what is the process to add a custom button to the windows explorer bar programmatically? It is different in Windows 7 and 8?

是否可以在 C# 中实现?还是最好的方法是C++?

Is it possible to do it in C#? Or the best way is C++?

谢谢!

推荐答案

按钮设置在 Windows 注册表中,在HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\GUID\TasksItemsSelectedHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\GUID\TasksNoItemsSelected

The buttons are set in the Windows registry, under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\GUID\TasksItemsSelected and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\GUID\TasksNoItemsSelected

使用REG_SZ类型,数据为;分隔的shell命令名列表.

Use a type of REG_SZ, and the data is a ; separated list of shell command names.

我知道的文件夹 GUID 是:

The folder GUIDs I know are:

  • 5c4f28b5-f869-4e84-8e60-f11db97c5cc7 -> 常规
  • 5fa96407-7e77-483c-ac93-691d05850de8 -> 视频
  • 7d49d726-3c21-4f05-99aa-fdc2c9474656 -> 文档
  • 94d6ddcc-4a68-4175-a374-bd584a510b78 -> 音乐
  • b3690e58-e961-423b-b687-386ebfd83239 -> 图片
  • 5f4eab9a-6833-4f61-899d-31cf46979d49 -> 其他库

您可以从注册表项中选取的任务:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell

The tasks you can pick are from the registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell

您可以使用 command 子键将普通可执行文件添加到此列表中,并将 exe 命令放在数据字段中.看看周围的例子.

You can add plain executables to this list by using the command subkey, and put the exe command in the data field. Have a look around for examples.

狩猎愉快.

这篇关于如何在 Windows 资源管理器工具栏中创建自定义按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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