追加到默认的提示在一个外壳扩展 [英] Append to the default tooltip in a shell extension

查看:178
本文介绍了追加到默认的提示在一个外壳扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须使用 SharpShell 一个外壳扩展建成。我想知道如果有可能追加到你看到提示,当您将鼠标放在一个文件:

I have a shell extension built using SharpShell. I am wondering if it is possible to append to the tooltip you see when you mouse over a file:

我已阅读并尝试使用壳牌信息提示处理程序,但这样做的问题是,它会覆盖与你将它设置为,而不是给你一个文本行追加到默认的提示,你通常会看到,这是能够在整个工具提示我期望的结果。

I have read and tried to use a Shell Info Tip Handler, but the problem with this is that it overrides the entire tooltip with what you set it to, instead of giving you the ability to append a line of text to the default tooltip you normally would see, which is my desired outcome.

我有一种感觉,这可能无法在SharpShell支持,因此,它会帮助我摆脱人的见解,我怎么可能另外接近MSVC ++外壳扩展在这个问题为好。

I have a feeling this may not be supported in SharpShell, as a result, it would help for me to get insights from people as to how I could additionally approach this problem within MSVC++ shell extensions as well.

推荐答案

这是可能的,但不是通过一个shell提示扩展。相反,通过壳财产处理程序即可。配方属性处理程序是记录在这里 ,可以在完全从的这个仓库。这里的在Windows 10在行动上一个画面:

This is possible, but not through a shell tooltip extension. Instead, through a shell property handler. The Recipe Property Handler is documented here and can be downloaded in full from this repository. Here's a picture of it in action in Windows 10:

这基本上是由注册本身作为一个属性的处理程序,如财产配方困难 PerfectSteaks.recipe 文件code>谁的关键是 Microsoft.SampleRecipe.Difficulty 键,可以很容易地设置通过修改浏览器显示在 HKCR HKEY_CLASSES_ROOT\SystemFileAssociations\.recipe 信息提示(类型为 REG_SZ )设置为道具:System.ItemType; System.Author; System.Rating; Microsoft.SampleRecipe.Difficulty 这将导致它来显示。

It essentially adds extra file properties to the PerfectSteaks.recipe file by registering itself as a property handler, such as the property for Recipe difficulty who's key is Microsoft.SampleRecipe.Difficulty and can easily be set to show in Explorer by modifying the HKCR key HKEY_CLASSES_ROOT\SystemFileAssociations\.recipe to have InfoTip (of type REG_SZ) set as prop:System.ItemType;System.Author;System.Rating;Microsoft.SampleRecipe.Difficulty which causes it to display.

属性存储在文件中。在 .recipe 文件是一个XML文件,其中包含,除其他事项外,该处理程序检索实际困难:

The properties are stored within the file itself. The .recipe file is an XML file which contains, among other things, the actual difficulty which the handler retrieves:

<RecipeInfo>
    <Difficulty>Hard</Difficulty>
    <PreparationTime>5</PreparationTime>
    <CookTime>20</CookTime>
    <Yield>2 servings</Yield>
</RecipeInfo>

这是不是唯一的这些日子里的东西,因为有很多的文件格式都提供某种形式的额外的内部API的进行存储。如果您正在使用的Office文件(这我),你可能会发现他们使用OLE内暴露他们对存储性能的持久性。在 DSOFile.dll 点击这里下载源)是Office文件的最大利益的,一般其他文件了。你会看到它会尝试Office文件格式内OLE存储,除非它试图在的Microsoft Office元数据处理程序存储。如果失败,它终于尝试使用备用流(而不是替代的粉丝流自己,因为他们不会持续)。

This is not something unique these days because a lot of file formats do provide some form of extra internal API for storage. If you are working with Office files (which I am), you may notice they expose properties for storage within them for persistence using OLE. The DSOFile.dll (click here to download the source) is of utmost interest for Office files, and generally other files too. You will see it tries OLE storage within the Office file format itself, barring that it tries the Microsoft Office Metadata Handler for storage. If that fails, it finally tries using alternate streams (not a fan of alternate streams myself because they won't persist).

这样说来,用的组合外壳财产处理和类似手段DSOFile.dll,您可以合并的解决方案对于获得这个工作以适当方式进行。

So that being said, with a combination of a shell property handler and similar tactics to DSOFile.dll, you can merge a solution for getting this job done in a proper way.

这篇关于追加到默认的提示在一个外壳扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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