## wxTaskBarIcon

This class represents a Windows 95 taskbar icon, appearing in the 'system tray' and responding to mouse clicks. An icon has an optional tooltip. This class is only supported for Windows 95/NT.

Derived from

wxEvtHandler
wxObject

Include files

<wx/taskbar.h>

Event handling

To process input from a taskbar icon, use the following event handler macros to direct input to member functions that take a wxTaskBarIconEvent argument.

EVT_TASKBAR_MOVE(func) | Process a wxEVT_TASKBAR_MOVE event.
EVT_TASKBAR_LEFT_DOWN(func) | Process a wxEVT_TASKBAR_LEFT_DOWN event.
EVT_TASKBAR_LEFT_UP(func) | Process a wxEVT_TASKBAR_LEFT_UP event.
EVT_TASKBAR_RIGHT_DOWN(func) | Process a wxEVT_TASKBAR_RIGHT_DOWN event.
EVT_TASKBAR_RIGHT_UP(func) | Process a wxEVT_TASKBAR_RIGHT_UP event.
EVT_TASKBAR_LEFT_DCLICK(func) | Process a wxEVT_TASKBAR_LEFT_DCLICK event.
EVT_TASKBAR_RIGHT_DCLICK(func) | Process a wxEVT_TASKBAR_RIGHT_DCLICK event.

Members wxTaskBarIcon::wxTaskBarIcon
wxTaskBarIcon::~wxTaskBarIcon
wxTaskBarIcon::IsIconInstalled
wxTaskBarIcon::IsOK
wxTaskBarIcon::OnLButtonDown
wxTaskBarIcon::OnLButtonDClick
wxTaskBarIcon::OnLButtonUp
wxTaskBarIcon::OnRButtonDown
wxTaskBarIcon::OnRButtonDClick
wxTaskBarIcon::OnRButtonUp
wxTaskBarIcon::OnMouseMove
wxTaskBarIcon::PopupMenu
wxTaskBarIcon::RemoveIcon
wxTaskBarIcon::SetIcon

### wxTaskBarIcon::wxTaskBarIcon

wxTaskBarIcon()

Default constructor.

### wxTaskBarIcon::~wxTaskBarIcon

~wxTaskBarIcon()

Destroys the wxTaskBarIcon object, removing the icon if not already removed.

### wxTaskBarIcon::IsIconInstalled

bool IsIconInstalled()

Returns TRUE if SetIcon was called with no subsequent RemoveIcon.

### wxTaskBarIcon::IsOK

bool IsOK()

Returns TRUE if the object initialized successfully.

### wxTaskBarIcon::OnLButtonDown

virtual void OnLButtonDown()

Override this function to intercept left mouse button down events.

### wxTaskBarIcon::OnLButtonDClick

virtual void OnLButtonDClick()

Override this function to intercept left mouse button double-click events.

### wxTaskBarIcon::OnLButtonUp

virtual void OnLButtonUp()

Override this function to intercept left mouse button up events.

### wxTaskBarIcon::OnRButtonDown

virtual void OnRButtonDown()

Override this function to intercept right mouse button down events.

### wxTaskBarIcon::OnRButtonDClick

virtual void OnRButtonDClick()

Override this function to intercept right mouse button double-click events.

### wxTaskBarIcon::OnRButtonUp

virtual void OnRButtonUp()

Override this function to intercept right mouse button up events.

### wxTaskBarIcon::OnMouseMove

virtual void OnMouseMove()

Override this function to intercept mouse move events.

### wxTaskBarIcon::PopupMenu

bool PopupMenu(wxMenu* menu)

Pops up a menu at the current mouse position. The events can be handled by a class derived from wxTaskBarIcon.

### wxTaskBarIcon::RemoveIcon

bool RemoveIcon()

Removes the icon previously set with SetIcon.

### wxTaskBarIcon::SetIcon

bool SetIcon(const wxIcon& icon, const wxString& tooltip)

Sets the icon, and optional tooltip text.