What is an Icon?

To the user, an icon is a small graphic image that represents an application when that application's main window is minimized. For example, Microsoft Paintbrush uses an icon that looks like a painter's palette to represent its minimized window. Icons are also used in message and dialog boxes.

To the application, an icon is a type of resource. Before resource compilation, each icon is a separate file that contains a set of bitmap images. The images may be similar in appearance, but each is targeted for a different display device. When the application wants to use an icon, it simply requests the icon resource by name. Windows then decides which of that icon's images is most appropriate for the current display. Because Windows handles this decision, the application doesn't need to check the display type or determine which icon image is best suited for the current display. Figure 17.1 illustrates what happens when an application requests an icon resource.