Home   Index   About
Ultimate Pack


Custom Search
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.


Last news from Greatis Software

Nostalgia .Net     Nostalgia .Net     .Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes.  More »

Recommended software for developers

Ultimate Pack for Delphi and C++ Builder     Ultimate Pack     Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price.  More »

Form Designer .Net     Form Designer .Net     Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro!  More »

Print Suite .Net     Print Suite .Net     Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available  More »

Gradient Controls .Net     Gradient Controls .Net     Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available  More »

iGrid     Greatis iGrid     iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors.  More »


All the contacts and projects

Dmitry Vasiliev (just.dmitry)

Related Links

Software for Visual Studio .NET developers
Software for Delphi and C++ Builder developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET

More Online Helps

Win32 Programmer's Reference
Win32 Multimedia Programmer's Reference
OLE Programmer's Reference
Microsoft Windows Pen API Programmer's Reference
Microsoft Windows Sockets 2 Reference
Microsoft Windows Telephony API (TAPI) Programmer's Reference
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008-2012 Free Tech Secrets ;) greatis just4fun network just4fun