Contents Index Topic Contents | ||
Previous Topic: IEnumIDList::Skip Next Topic: IExtractIcon::Extract |
IExtractIcon
The shell uses the IExtractIcon interface to retrieve icons for objects it displays.
The operating system provides default icons for file objects, but you can specify custom icons by making appropriate registry entries and, in some cases, by using IExtractIcon.
When to Implement
You implement IExtractIcon to provide either instance-specific icons for objects in a particular class or icons for subfolders that extend Windows Explorer's namespace. These implementations are accomplished by writing handler code in an OLE in-process server COM DLL.
Also, if you implement IShellFolder, you will need to provide an implementation of IExtractIcon that callers can obtain by using the IShellFolder::GetUIObjectOf method.
Shell extensions based on IExtractIcon must be initialized by using the IPersistFile::Load method. You should also note that shell extensions do not work unless all appropriate registry entries are made.
When to Use
In most cases, you do not call this interface directly. It is usually called by the shell when an icon has been made available by a properly registered handler. However, you can call IExtractIcon directly if you want to delegate icon extraction to another object.
IExtractIcon Methods Description Extract Extracts an icon from the specified location. GetIconLocation Retrieves the icon location for an object.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.