| Tray_Add( | hGui, | | | | fun, | | | | ico, | | | | txt | = | "" | ) |
|
Add new icon in the system tray
Parameters
| hGui | Handle of the parent window (the one that monitors notification messages) |
| fun | Notification subroutine |
| ico | Icon path or handle. Icons allocated by module will be automatically destroyed when Remove function returns. If the user passed icon handle, Remove will not destroy it. |
| txt | Optional tooltip text |
Globals
| Tray_HWND | Handle of the tray icon |
| Tray_EVENT | Tray event |
Events
Notification subroutine will be called on mouse events. You can receive L,R and M events (left, right and middle button click) and “Move” event on mouse move. Additionally, “u” or “d” can follow event name meaning “up” and “doubleclick”.
Returns
0 on failure, handle on success. This handle is used with other Tray functions.