Setting Default Icons for File Classes
The system uses icons to represent file objects in the shell. Typically, all files of the same class have the same icon. By adding the DefaultIcon key to the file association key for a particular file class, you can specify the icon that the system displays for all files of the class. The value of the DefaultIcon key specifies the executable file (or DLL) that contains the icon and the index of the icon within the file.
HKEY_CLASSES_ROOT
.doc=AWordProcessor
DefaultIcon=C:\MYDIR\MYAPP.EXE,1
If the registry does not contain a DefaultIcon key for a particular file class, the system uses the default icon for the class. One of the advantages of using a class icon is that it requires no programming; the shell handles displaying the icon for the class.
By writing an icon handler, you give each instance of a file a different icon. For more information about icon handlers, see Icon Handlers.