Chapter 5. Icon Handlers

only for RuBoard - do not distribute or recompile

Chapter 5. Icon Handlers

Icons are defined for a particular file class by adding a DefaultIcon key under the files association key in the registry. DefaultIcon is then set to a path containing the .exe or .dll that contains the icon to be displayed and the zero-based index of that icon within the file, if multiple icons are present. Figure 5.1, for example, shows the relevant registry keys for our example .rad file type, which is configured to use the second icon in notepad.exe . Every icon for the file class in question will have the same icon when this key is registered.

Figure 5.1. Registering the default icon for a file class
figs/vshl.0501.gif

Icon handlers allow file objects of the same type to display different icons on a per-instance basis. This means that such things as the value of particular file attributes or state information internal to the file can be conveyed to the user through the shell. Take the .rad file, for instance. Using an icon handler, we could display a picture of the animal represented by the file (for a limited number of animals, of course), the age of the animal, the gender, or whatever.

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