From fa1c12bdd76acc21ddb45b90bb53b2f58aed946d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 21 Nov 2001 23:39:26 +0000 Subject: [PATCH] fixed wxTaskBarIcon compilation git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/taskbar.h | 23 +++++++++++++++++++---- src/msw/taskbar.cpp | 4 +--- 2 files changed, 20 insertions(+), 7 deletions(-) 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); } -- 2.45.2