Icon Sizes

Windows uses four icon sizes: system small, system large, shell small, and shell large.

The system small icon is displayed in the window caption. To change the size of the system small icon, start the Display control panel applet, click the Appearance tab, select Caption Buttons from the Item list, then set the Size field. To retrieve the size of the system small icon, call the GetSystemMetrics function with SM_CXSMICON and SM_CYSMICON.

The system large icon is mainly used by applications, but it is also displayed in the Alt+Tab dialog. The CreateIconFromResource, DrawIcon, ExtractIcon, and LoadIcon functions all use system large icons. The size of the system large icon is defined by the video driver, therefore it cannot be changed. You can retrieve the size of the system large icon by calling GetSystemMetrics with SM_CXICON and SM_CYICON.

The CreateIcon, CreateIconFromResourceEx, and CreateIconIndirect functions can be used to work with icons in sizes other than system large.

The shell small icon is used in the Windows Explorer and the common dialogs. Currently, this defaults to the system small size. To retrieve the size of the shell small icon, use the SHGetFileInfo function with SHGFI_SHELLICONSIZE | SHGFI_SMALLICON to retrieve the handle of the system image list, then the ImageList_GetIconSize function to get the icon size.

The shell large icon is used on the desktop. To change the size of the large icon, start the Display control panel applet, click the Appearance tab, select Icon from the Item list, then set the Size field (this size is stored in the registry, under HKEY_CURRENT_USER\Control Panel, Desktop\WindowMetrics\Shell Icon Size). You must also click the Plus! tab and select the Use large icons check box. To retrieve the size of the shell large icon, use the SHGetFileInfo function with SHGFI_SHELLICONSIZE to retrieve the handle of the system image list, then the ImageList_GetIconSize function to get the icon size.

The Start menu uses either shell small icons or shell large icons, depending on whether the Use large icons check box is selected.

Your application should supply icon resources in the following sizes:

  • 48x48, 256 color

  • 32x32, 16 color

  • 16x16 pixels, 16 color

When filling in the WNDCLASSEX structure to be used in registering your window class, set the hIcon member to the 32x32 icon and the hIconSm member to the 16x16 icon. For more information about class icons, see Class Icons.

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database