All Manuals > CAPI User Guide and Reference Manual > 22 GRAPHICS-PORTS Reference Entries

load-icon-image Function

Summary

Loads a Windows icon image, and returns the image object.

Package

graphics-ports

Signature

load-icon-image port id &key width height => image

Arguments
port
A graphics port or CAPI object.
id
A keyword, string or pathname.
width
The desired width in pixels, or nil.
height
The desired height in pixels, or nil.
Values
image
An image object.
Description

The function load-icon-image loads an icon specified by id which should be either a keyword describing a standard icon, or a string or a pathname naming a Windows format icon (.ico) file.

The following keyword values of id are recognized:

:sample
A rectangle.
:hand
A cross in a circle.
:ques
A question mark in a bubble.
:bang
An exclamation mark in a triangle.
:note
An 'I' in a bubble.
:winlogo
The Windows logo.
:warning
Same as :bang.
:error
Same as :hand.
:information
Same as :note.

load-icon-image returns an image object which can be drawn to port using draw-image and which must be freed using free-image when no longer needed.

When id specifies a file and width and height are specified, then the most appropriate image is chosen from the icon file and is scaled accordingly. If width and height are nil the first image in the file is used at its natural size. width defaults to nil and height defaults to width.

Note: load-icon-image is defined only in LispWorks for Windows.

See also

draw-image
free-image
load-image
13 Drawing - Graphics Ports


CAPI User Guide and Reference Manual (Windows version) - 01 Dec 2021 19:34:15