TTrayIcon
TTrayIcon
Header File
<owl/trayicon.h>
This is a conglomeration of ideas from the MSG "Webster" application,
sniffing round the online docs, and from other implementations such as PJ Daughter's
"CTrayIconifyIcon" (http://indigo.i.e./~pjn/tray.html) especially the
"CTrayIcon::OnTrayNotification" member function. This class is a light wrapper
around the windows system tray stuff. It adds an icon to the system tray with the
specified ToolTip text and callback notification value, which is sent back to the Parent
window.
get example trayicon.zip
Constructors
TTrayIcon::TTrayIcon
Form 1
TTrayIcon(TModule* module=gModule);
Form 2
TTrayIcon(TWindow* parent,
uint msg, const owl_string& tip, TIcon& icon, uint id, TModule* module=gModule);
Form 3
TTrayIcon(TWindow* parent,
uint msg, const owl_string& tip, TResId icon, uint id, TModule* module=gModule);
Description
Creates a TTrayIcon object.
Public Member Functions
Init
Syntax
virtual void Init(TWindow* parent, uint
msg, owl_string& tip, TIcon* icon=0, uint id=0);
Description
Initialized tray icon object.
Enabled
Syntax
bool Enabled() const;
Description
Visible
Syntax
bool Visible() const;
Create
Syntax
bool Create();
Syntax
SetText
Form 1
bool SetText(const owl_string&
text);
Form 1
bool SetText(TResId resId);
Description
GetText
Syntax
owl_string GetText() const;
Description
SetParent
Syntax
bool SetParent(TWindow*
wnd);
Description
GetParent
Syntax
TWindow* GetParent() const;
Description
SetIcon
Form 1
bool SetIcon(TIcon&
icon, TAutoDelete = NoAutoDelete);
Form 2
bool SetIcon(TResId resId);
Description
GetIcon
Syntax
TIcon* GetIcon() const;|
Description
HideIcon
Syntax
void HideIcon();
Description
ShowIcon
Syntax
void ShowIcon();
Description
RemoveIcon
Syntax
void RemoveIcon();
Description
MoveToRight
Syntax
void MoveToRight();
Description
EvTrayNotification
Syntax
TResult EvTrayNotification(TParam1
param1, TParam2 param2);
Description
Revised: February 08, 2000.