10.1 How InfoTip Handlers Work

only for RuBoard - do not distribute or recompile

10.1 How InfoTip Handlers Work

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 file object:

 HKEY_CLASSES_ROOT\     .rad\         shellex\             {00021500-0000-0000-C000-000000000046} 

The .rad key is replaceable with the file object of your choice, of course. But notice the CLSID. This key will be the same for every InfoTip handler that you write. It is the GUID of IQueryInfo , the primary interface that is implemented by all InfoTip handlers. Also, notice that unlike the other shell extensions, this handler is registered under the file association key, as opposed to the application identifier.

If a handler exists, the shell passes the name of the file object to the handler via IPersistFile::Load . This allows the InfoTip handler to examine the contents of the file, extract pertinent information, and construct a meaningful InfoTip for the shell to display.

After Load , the shell calls IQueryInfo::GetInfoTip , passing in a buffer. The handler will copy the InfoTip string into this buffer, and the shell will display the tip. It's that simple.

only for RuBoard - do not distribute or recompile


Visual Basic Shell Programming
Visual Basic Shell Programming
ISBN: B00007FY99
EAN: N/A
Year: 2000
Pages: 128

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net