The single-line statements define resources that are contained in a single file, such as cursors, icons, and fonts. The statements associate the filename of the resource with an identifying name or number. The resource is added to the executable file when the application is created and can be extracted during execution by referring to the name or number.
The following is the general form for all single-line statements:
Summary: Syntax
nameID resourcetype[[loadoption]] [[memoption]]filename
The nameID field specifies either a unique name or an integer identifying the resource. For a font resource, nameID must be a number; it cannot be a name.The resourcetype field specifies one of the following keywords, which identify the type of resource to be loaded:
CURSOR
Specifies a bitmap that defines the shape of the cursor on the display screen.
ICON
Specifies a bitmap that defines the shape of the icon to be used for a given application.
BITMAP
Specifies a custom bitmap that an application is going to use in its screen display or as an item in a menu.
FONT
Specifies a file that contains a font.
The optional loadoption field takes a keyword that specifies when the resource is to be loaded. The keyword must be one of the following:
PRELOAD
Resource is loaded immediately.
LOADONCALL
Resource is loaded when called. This is the default option.
NOTE:
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 optional memoption field takes the following keyword or keywords, which specify the memory status of the resource:
FIXED
Resource remains at a fixed memory location.
MOVEABLE
Resource can be moved if necessary to compress memory.
DISCARDABLE
Resource can be discarded if no longer needed.
The default is both MOVEABLE and DISCARDABLE for cursor, icon, and font
resources. The default for bitmap resources is MOVEABLE.
The filename field is an ASCII string that specifies the DOS filename of the file that contains the resource. A full path must be given if the file is not in the current working directory.
The following example demonstrates the correct usage for a single-line statement:
cursor CURSOR point.cur
cursor CURSOR DISCARDABLE point.cur
10 CURSOR custom.cur
desk ICON desk.ico
desk ICON DISCARDABLE desk.ico
11 ICON custom.ico
disk BITMAP disk.bmp
disk BITMAP DISCARDABLE disk.bmp
12 BITMAP custom.bmp
5 FONT CMROMAN.FNT