X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..6151e1445bdca0dfca660e3851aa3705bfd543de:/src/msw/taskbar.cpp diff --git a/src/msw/taskbar.cpp b/src/msw/taskbar.cpp index 13235cea9d..f17654653b 100644 --- a/src/msw/taskbar.cpp +++ b/src/msw/taskbar.cpp @@ -52,12 +52,19 @@ LRESULT APIENTRY _EXPORT wxTaskBarIconWindowProc( HWND hWnd, unsigned msg, UINT wParam, LONG lParam ); -wxChar *wxTaskBarWindowClass = wxT("wxTaskBarWindowClass"); +wxChar *wxTaskBarWindowClass = (wxChar*) wxT("wxTaskBarWindowClass"); wxList wxTaskBarIcon::sm_taskBarIcons; bool wxTaskBarIcon::sm_registeredClass = FALSE; UINT wxTaskBarIcon::sm_taskbarMsg = 0; +DEFINE_EVENT_TYPE( wxEVT_TASKBAR_MOVE ) +DEFINE_EVENT_TYPE( wxEVT_TASKBAR_LEFT_DOWN ) +DEFINE_EVENT_TYPE( wxEVT_TASKBAR_LEFT_UP ) +DEFINE_EVENT_TYPE( wxEVT_TASKBAR_RIGHT_DOWN ) +DEFINE_EVENT_TYPE( wxEVT_TASKBAR_RIGHT_UP ) +DEFINE_EVENT_TYPE( wxEVT_TASKBAR_LEFT_DCLICK ) +DEFINE_EVENT_TYPE( wxEVT_TASKBAR_RIGHT_DCLICK ) BEGIN_EVENT_TABLE(wxTaskBarIcon, wxEvtHandler) EVT_TASKBAR_MOVE (wxTaskBarIcon::_OnMouseMove) @@ -113,10 +120,10 @@ bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip) notifyData.hWnd = (HWND) m_hWnd; notifyData.uCallbackMessage = sm_taskbarMsg; notifyData.uFlags = NIF_MESSAGE ; - if (icon.Ok()) + if (icon.Ok()) { - notifyData.uFlags |= NIF_ICON; - notifyData.hIcon = (HICON) icon.GetHICON(); + notifyData.uFlags |= NIF_ICON; + notifyData.hIcon = (HICON) icon.GetHICON(); } if (((const wxChar*) tooltip != NULL) && (tooltip != wxT(""))) @@ -355,9 +362,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); }