nameID ICON [load-option] [mem-option] filename
The ICON resource-definition statement specifies a bitmap that defines the shape of the icon to be used for a given application.
nameID
Specifies either a unique name or an integer value identifying the resource.
load-option
Specifies when the resource is to be loaded. The parameter must be one of the following options:
Option | Description |
PRELOAD | Resource is loaded immediately. |
LOADONCALL | Resource is loaded when called. This is the default option. |
mem-option
Specifies whether the resource is fixed or movable and whether it is discardable. The parameter must be one of the following options:
Option | Description |
FIXED | Resource remains at a fixed memory location. |
MOVEABLE | Resource can be moved if necessary in order to compact memory. |
DISCARDABLE | Resource can be discarded if no longer needed. |
The default is MOVEABLE and DISCARDABLE for cursor, icon, and font resources. The default for bitmap resources is MOVEABLE.
filename
Specifies the name of the file that contains the resource. The name must be a valid MS-DOS filename; it must be a full path if the file is not in the current working directory. The path can either be a quoted or non-quoted string.
Icon and cursor resources can contain more than one image. If the resource is marked as PRELOAD, Windows loads all images in the resource when the application executes.
The following example specifies two icon resources:
desk1 ICON desk.ico
11 ICON DISCARDABLE custom.ico