%ti - Taskbar Icon


To provide a taskbar icon in the system tray.


external cb_func


Under Windows 95/NT 4.0 (and later operating systems) there is a region on the taskbar (sometimes erroneously called the "system tray") to the right where some programs place an icon - usually because they are in a quiescent state. This area is typically used by the modem, speaker volume control, and clock. These icons usually display some text if the mouse is placed over them and respond to mouse clicks by becoming active in some way. Win32 ClearWin+ programs can use this area via the %ti format code.

This format takes two standard strings (the icon resource and help text respectively) and a call-back function. The call-back function will be called for all mouse actions over the taskbar icon. The different mouse actions can be distinguished by using CLEARWIN_STRING@('CALLBACK_REASON').

Typically, the call-back function should respond to clicks (or perhaps double clicks) only. A window containing a %ti format will be invisible apart from the taskbar icon, so there is no point in adding other controls to a %ti window. However, in other ways a %ti window is analogous to an ordinary window. In particular, if the call-back function returns a zero or negative number, the window will close and the icon will be removed from the taskbar. Closure can also be effected using %lw (Leave Window Open) by setting the associated control variable to a zero value and passing it to WINDOW_UPDATE@.


icon_name can contructed from a known Windows (integer kind=7) handle (see Using the handle of a resource).


winio@('%ti[my_icon][Click here]',cb)

Within the call-back function:		  
 . . .





Copyright © 1999-2024 Silverfrost Limited