SHGetIconOverlayIndex function
Returns the index of the overlay icon in the system image list.
Syntax
int SHGetIconOverlayIndex( _In_opt_ LPCTSTR pszIconPath, int iIconIndex );
Parameters
- pszIconPath [in, optional]
-
Type: LPCTSTR
A pointer to a null-terminated string of maximum length MAX_PATH that contains the fully qualified path of the file that contains the icon.
- iIconIndex
-
Type: int
The icon's index in the file pointed to by pszIconPath. To request a standard overlay icon, set pszIconPath to NULL, and iIconIndex to one of the following:
IDO_SHGIOI_SHARE (0x0FFFFFFF)
-
The overlay icon that indicates a shared folder.
IDO_SHGIOI_LINK (0x0FFFFFFE)
-
The overlay icon that indicates a linked folder or file.
IDO_SHGIOI_SLOWFILE (0x0FFFFFFD)
-
The overlay icon that indicates a slow file.
IDO_SHGIOI_DEFAULT (0x0FFFFFFC)
-
Windows 7 and later. The overlay icon that indicates that the item is the default in a set. One example is the default printer.
Return value
Type: int
Returns the index of the overlay icon in the system image list if successful, or -1 otherwise.
Remarks
Icon overlays are part of the system image list. They have two identifiers. The first is a one-based overlay index that identifies the overlay relative to other overlays in the image list. The other is an image index that identifies the actual image. These two indexes are equivalent to the values that you assign to the iOverlay and iImage parameters, respectively, when you add an icon overlay to a private image list with ImageList_SetOverlayImage. SHGetIconOverlayIndex returns the overlay index. To convert an overlay index to its equivalent image index, call INDEXTOOVERLAYMASK.
Note After the image has been loaded into the system image list during initialization, it cannot be changed. The file name and index specified by pszIconPath and iIconIndex are used only to identify the icon overlay. SHGetIconOverlayIndex cannot be used to modify the system image list.
Requirements
|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server | Windows 2000 Server [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | SHGetIconOverlayIndexW (Unicode) and SHGetIconOverlayIndexA (ANSI) |
See also
Send comments about this topic to Microsoft
Build date: 11/28/2012
