62 Init(
nullptr, 0, tos,
nullptr, 0);
75 Init(parent, msg, tip, &icon,
id);
107 cbSize =
sizeof(NOTIFYICONDATA);
111 uCallbackMessage = 0;
114 uCallbackMessage = msg;
115 uFlags |= NIF_MESSAGE;
122 memset(szTip, 0,
sizeof(szTip));
129 ::_tcscpy(szTip, tip.c_str());
212 uFlags |= NIF_MESSAGE;
246 if(
_tcscmp(text.c_str(),szTip)!= 0){
294 if (LOWORD(event) == WM_RBUTTONUP){
301 ::SetForegroundWindow(*
Parent);
307 else if (LOWORD(event) == WM_LBUTTONDBLCLK){
312 ::SetForegroundWindow(*
Parent);
#define PRECONDITION(condition)
TIcon, derived from TGdiObject, represents the GDI object icon class.
TIcon(HICON handle, TAutoDelete autoDelete=NoAutoDelete)
Creates a TIcon object and sets the Handle data member to the given borrowed handle.
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TPoint is a support class, derived from tagPOINT.
static BOOL Shell_NotifyIcon(DWORD, PNOTIFYICONDATA)
Invokes 'Shell_NotifyIcon' indirectly.
bool SetParent(TWindow *wnd)
bool SetText(const tstring &text)
bool bEnabled
does O/S support tray icon?
bool bHidden
Has the icon been hidden?
virtual void Init(TWindow *parent, TMsgId, const tstring &tip, TIcon *icon=0, uint id=0)
TResult EvTrayNotification(TParam1, TParam2)
Default handler for tray notification message.
bool SetIcon(TIcon &icon, TAutoDelete=NoAutoDelete)
bool Create()
Create the tray icon => must have valid hWnd => call in SetupWindow();.
TTrayIcon(TModule *module=&GetGlobalModule())
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
bool IsWindow() const
Returns true if an HWND is being used.
TResult SendMessage(TMsgId, TParam1=0, TParam2=0) const
Sends a message (msg) to a specified window or windows.
HWND GetHandle() const
Returns the handle of the window.
TAutoDelete
Flag for Handle ctors to control Handle deletion in dtor.
Object Windows Library (OWLNext Core).
UINT TMsgId
Message ID type.
LPARAM TParam2
Second parameter type.
WPARAM TParam1
First parameter type.
LRESULT TResult
Result type.
Definitions of Win95 Shell Clases: TShellItem, TShellItemIterator, TPidl, TShellMalloc.
Base window class TWindow definition, including HWND encapsulation.