Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

tray-item-icon

Arguments: tray-item

Returns the handle (an integer) of the icon that is currently being used for the specified tray-item, or nil for a default icon. The initial value is nil, and so an application would typically specify a custom icon to use before adding the tray-item to the system tray with add-tray-item. The icon may be changed at any time, regardless of whether the tray-item is currently in the tray.

The icon to display may be specified by passing an icon handle as the :icon initarg value to make-instance when creating the tray-item, or anytime later by passing the icon handle to (setf tray-item-icon).

The icon handle may be obtained by calling either extract-icon-from-file or create-icon-handle. Using extract-icon-from-file would require shipping the icon file from which it is extracted with the application. See cg-icons.htm for an example of creating an icon within Lisp with create-icon-handle. One of the built-in icons such as error-icon could also be used, though this would not identify your application.

A value of nil (the default) causes the standard icon whose handle is the value of question-icon to be displayed.

A value of zero will display a blank area where the icon image would normally appear. A tray-item's icon could therefore be made to flash on and off by using a timer to switch the tray-item-icon between an icon handle and zero.

tray-item must be an instance of the tray-item class, as created with make-instance. See the description of the tray-item class for an example.


Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version