Windows that are created with this class will hide themself in the windows traybar when they are minimized.
:class TrayWindow <super window
TrayWindow class
:M DefaultIcon: ( -- hIcon )
Get the handle of the icon which should be added to the traybar.
:M GetTooltip: ( -- addr len )
Get the tooltip text for the traybar icon.
:M AddIcon: ( -- )
Add our icon to the traybar
:M DeleteIcon: ( -- )
Remove our icon from the traybar
:M IsVisible?: ( -- f )
Check if the window is visible or not.
:M ShowWindow: ( -- )
Show the window and remove the icon from the traybar.
:M HideWindow: ( -- )
Hide the window and add the icon to the traybar.
:M WM_SIZE ( hWnd uMsg wParam lParam -- res )
Handle the WM_SIZE message. If the window is minimized it will be hidden and the icon will be added to the traybar.
:M WM_SYSCOMMAND ( hWnd uMsg wParam lParam -- res )
Handle the WM_SYSCOMMAND message. If the window is minimized it will be hidden and the icon will be added to the traybar.
:M On_IconNotify: ( hWnd uMsg wParam lParam -- res )
Handle the messages from the traybar icon.
The default handler removes the icon for the traybar and shows the window, when the user click's with the left mouse button on the tray icon.
If the right mouse button is used the popup menu of the window is shown. Use the SetPopupBar: method to assign a popup menu to the window.
;class
End of TrayWindow class
\ Create a tray window :object TestWindow <super TrayWindow :M GetTooltip: ( -- addr len ) s" TrayWindow Test" ;M ;object Start: TestWindow \ open the window SW_MINIMIZE Show: TestWindow \ minimize it to hide it in the TrayBar
Document $Id: TrayWindow.htm,v 1.10 2007/05/26 10:24:12 dbu_de Exp $