InfoTip handlers display tool tips, or “info” tips, for a file object on a per-instance basis. You can view this behavior for yourself if you have Microsoft Word installed on your machine. Find a .doc file and select it. Hold the cursor over the file and an InfoTip displaying the author of the document should appear momentarily. Figure 10.1 demonstrates the InfoTip in action.
Figure 10-1. InfoTip handler for Microsoft Word
InfoTip handlers are usually not considered shell extensions (the Platform SDK says nothing about them), but they are, in fact, just that. They are also very easy to implement.
InfoTip handlers implement
IPersistFile (we only
have to implement the
Load method) and
IQueryInfo has two
methods, but we need to implement only one of them. There are no
hoops to jump through this time around. Everything is very
straightforward. What a nice change! This chapter will also end our
discussion of shell extensions and the RadEx project on which we have
been working in the last seven chapters. So let’s get on with
it! The InfoTip handler we create will display the animal type
associated with the
.rad file in the format
“Type: (Animal Type).”
When the cursor is placed over a file object in Explorer, the shell checks the registry under the following key to see if there are any registered InfoTip handlers for that particular ...