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:
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.
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>
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).
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.
SetWindowSubclass
andRemoveWindowSubclass
functions to make operations on the linked list available to all comers. But no such infrastructure exists for Shell Info Tip Handlers. – Meditate