diff --git a/include/wx/msw/taskbar.h b/include/wx/msw/taskbar.h index bb3a9db3f5..c0fa59a0a6 100644 --- a/include/wx/msw/taskbar.h +++ b/include/wx/msw/taskbar.h @@ -1,13 +1,13 @@ ///////////////////////////////////////////////////////////////////////// -// File: taskbar.h -// Purpose: Defines wxTaskBarIcon class for manipulating icons on the +// File: wx/msw/taskbar.h +// Purpose: Defines wxTaskBarIcon class for manipulating icons on the // Windows task bar. // Author: Julian Smart // Modified by: // Created: 24/3/98 // RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////// #ifndef _TASKBAR_H_ @@ -76,6 +76,21 @@ protected: }; +// ---------------------------------------------------------------------------- +// wxTaskBarIcon events +// ---------------------------------------------------------------------------- + +class WXDLLEXPORT wxTaskBarIconEvent : public wxEvent +{ +public: + wxTaskBarIconEvent(wxEventType evtType, wxTaskBarIcon *tbIcon) + : wxEvent(-1, evtType) + { + SetEventObject(tbIcon); + } + + virtual wxEvent *Clone() const { return new wxTaskBarIconEvent(*this); } +}; const wxEventType wxEVT_TASKBAR_MOVE = wxEVT_FIRST + 1550; const wxEventType wxEVT_TASKBAR_LEFT_DOWN = wxEVT_FIRST + 1551; diff --git a/src/msw/taskbar.cpp b/src/msw/taskbar.cpp index 0cab9d2d3a..fa2ae43111 100644 --- a/src/msw/taskbar.cpp +++ b/src/msw/taskbar.cpp @@ -355,9 +355,7 @@ long wxTaskBarIcon::WindowProc( WXHWND hWnd, unsigned int msg, unsigned int wPar } if (eventType) { - wxEvent event; - event.SetEventType(eventType); - event.SetEventObject(this); + wxTaskBarIconEvent event(eventType, this); ProcessEvent(event); }