X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/41819cbe0c3feceb0954adc64a5e184ff8d7c4ea..1ac76609146a74466b88e53b551e9ea01c5c8801:/src/msw/taskbar.cpp diff --git a/src/msw/taskbar.cpp b/src/msw/taskbar.cpp index 64c5dee7ec..c5b9b9b5c1 100644 --- a/src/msw/taskbar.cpp +++ b/src/msw/taskbar.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// File: taskbar.cpp +// File: src/msw/taskbar.cpp // Purpose: Implements wxTaskBarIcon class for manipulating icons on // the Windows task bar. // Author: Julian Smart @@ -10,10 +10,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "taskbar.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -29,18 +25,12 @@ #include "wx/menu.h" #endif -#if defined(__WIN95__) - #include "wx/msw/private.h" #include "wx/msw/winundef.h" #include #include "wx/taskbar.h" -#ifdef __GNUWIN32_OLD__ - #include "wx/msw/gnuwin32/extra.h" -#endif - #ifdef __WXWINCE__ #include #include @@ -81,11 +71,11 @@ class wxTaskBarIconWindow : public wxFrame { public: wxTaskBarIconWindow(wxTaskBarIcon *icon) - : wxFrame(NULL, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0), + : wxFrame(NULL, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0), m_icon(icon) { } - + WXLRESULT MSWWindowProc(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam) { @@ -103,7 +93,7 @@ private: wxTaskBarIcon *m_icon; }; - + // ---------------------------------------------------------------------------- // NotifyIconData: wrapper around NOTIFYICONDATA // ---------------------------------------------------------------------------- @@ -147,8 +137,8 @@ wxTaskBarIcon::~wxTaskBarIcon() // Operations bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip) { - // NB: we have to create the window lazily because of backward compatiblity, - // old aplications may create wxTaskBarIcon instance before wxApp + // NB: we have to create the window lazily because of backward compatibility, + // old applications may create a wxTaskBarIcon instance before wxApp // is initialized (as samples/taskbar used to do) if (!m_win) { @@ -209,7 +199,7 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu) wxGetMousePosition(&x, &y); m_win->Move(x, y); - + m_win->PushEventHandler(this); menu->UpdateUI(); @@ -260,7 +250,7 @@ void wxTaskBarIcon::RegisterWindowMessages() static bool s_registered = false; if ( !s_registered ) - { + { // Taskbar restart msg will be sent to us if the icon needs to be redrawn gs_msgRestartTaskbar = RegisterWindowMessage(wxT("TaskbarCreated")); @@ -333,5 +323,3 @@ long wxTaskBarIcon::WindowProc(unsigned int msg, return 0; } - -#endif // __WIN95__