Click here to Skip to main content
15,897,226 members
Articles / Desktop Programming / WTL

Retrieving shell icons

Rate me:
Please Sign up or sign in to vote.
4.90/5 (13 votes)
19 Jun 2002CPOL3 min read 246.2K   5.9K   69  
Get shell icons, even if they're customized
#ifndef INCLUDED_SHELLICONS_H
#define INCLUDED_SHELLICONS_H

#pragma once

enum SHELLICONS {
	SI_UNKNOWN = 0,					///< Unknown File Type
	SI_DEF_DOCUMENT = 1,			///< Default document
	SI_DEF_APPLICATION = 2,			///< Default application
	SI_FOLDER_CLOSED = 3,			///< Closed folder
	SI_FOLDER_OPEN = 4,				///< Open folder
	SI_FLOPPY_514 = 5,				///< 5 1/4 floppy
	SI_FLOPPY_35 = 6,				///< 3 1/2 floppy
	SI_REMOVABLE = 7,				///< Removable drive
	SI_HDD = 8,						///< Hard disk drive
	SI_NETWORKDRIVE = 9,			///< Network drive
	SI_NETWORKDRIVE_DISCONNECTED = 10,	///< network drive offline
	SI_CDROM = 11,					///< CD drive
	SI_RAMDISK = 12,				///< RAM disk
	SI_NETWORK = 13,				///< Entire network
// 14 = ?
	SI_MYCOMPUTER = 15,				///< My Computer
	SI_PRINTMANAGER = 16,			///< Printer Manager
	SI_NETWORK_NEIGHBORHOOD = 17,	///< Network Neighborhood
	SI_NETWORK_WORKGROUP = 18,		///< Network Workgroup
	SI_STARTMENU_PROGRAMS = 19,		///< Start Menu Programs
	SI_STARTMENU_DOCUMENTS = 20,	///< Start Menu Documents
	SI_STARTMENU_SETTINGS = 21,		///< Start Menu Settings
	SI_STARTMENU_FIND = 22,			///< Start Menu Find
	SI_STARTMENU_HELP = 23,			///< Start Menu Help
	SI_STARTMENU_RUN = 24,			///< Start Menu Run
	SI_STARTMENU_SUSPEND = 25,		///< Start Menu Suspend
	SI_STARTMENU_DOCKING = 26,		///< Start Menu Docking
	SI_STARTMENU_SHUTDOWN = 27,		///< Start Menu Shutdown
	SI_SHARE = 28,					///< Sharing overlay (hand)
	SI_SHORTCUT = 29,				///< Shortcut overlay (small arrow)
	SI_PRINTER_DEFAULT = 30,		///< Default printer overlay (small tick)
	SI_RECYCLEBIN_EMPTY = 31,		///< Recycle bin empty
	SI_RECYCLEBIN_FULL = 32,		///< Recycle bin full
	SI_DUN = 33,					///< Dial-up Network Folder
	SI_DESKTOP = 34,				///< Desktop
	SI_CONTROLPANEL = 35,			///< Control Panel
	SI_PROGRAMGROUPS = 36,			///< Program Group
	SI_PRINTER = 37,				///< Printer
	SI_FONT = 38,					///< Font Folder
	SI_TASKBAR = 39,				///< Taskbar
	SI_AUDIO_CD = 40,				///< Audio CD
//41 = my computer
//42 = ?
	SI_FAVORITES = 43,				///< IE favorites		
	SI_LOGOFF = 44,					///< Start Menu Logoff
	SI_LOCK = 47,					///< Lock
	SI_HIBERNATE = 48,				///< Hibernate
};

/************************************************************************//**
 *
 *	Get a shell icon
 */
HICON ExtractShellIcon (int nIndex, bool bLargeIcons = false);

#endif // INCLUDED_SHELLICONS_H

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Cloud Klabauter GmbH
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions