X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4d0d77affc904ab045485794986179beed4b79f0..bfdc04a9bb95e6865570d59192718052b6229221:/src/msw/taskbar.cpp

diff --git a/src/msw/taskbar.cpp b/src/msw/taskbar.cpp
index 199471c456..23e0025154 100644
--- a/src/msw/taskbar.cpp
+++ b/src/msw/taskbar.cpp
@@ -10,7 +10,7 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "taskbar.h"
 #endif
 
@@ -29,23 +29,20 @@
 #include "wx/menu.h"
 #endif
 
-#if defined(__WIN95__) && !defined(__TWIN32__)
-
-#include <windows.h>
+#if defined(__WIN95__)
 
+#include "wx/msw/private.h"
 #include "wx/msw/winundef.h"
 
 #include <string.h>
 #include "wx/taskbar.h"
-#include "wx/msw/private.h"
 
-#ifndef __TWIN32__
-    #ifdef __GNUWIN32_OLD__
-        #include "wx/msw/gnuwin32/extra.h"
-    #endif
+#ifdef __GNUWIN32_OLD__
+    #include "wx/msw/gnuwin32/extra.h"
 #endif
 
-#ifdef __SALFORDC__
+#ifdef __WXWINCE__
+    #include <winreg.h>
     #include <shellapi.h>
 #endif
 
@@ -153,7 +150,8 @@ bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip)
     if ( !tooltip.empty() )
     {
         notifyData.uFlags |= NIF_TIP;
-        lstrcpyn(notifyData.szTip, tooltip.c_str(), WXSIZEOF(notifyData.szTip));
+//        lstrcpyn(notifyData.szTip, tooltip.c_str(), WXSIZEOF(notifyData.szTip));
+        wxStrncpy(notifyData.szTip, tooltip.c_str(), WXSIZEOF(notifyData.szTip));
     }
 
     bool ok = Shell_NotifyIcon(m_iconAdded ? NIM_MODIFY
@@ -186,7 +184,6 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu)
 
     s_inPopup = true;
 
-    bool        rval = false;
     wxWindow*   win;
     int         x, y;
     wxGetMousePosition(&x, &y);
@@ -204,7 +201,7 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu)
     // Work around a WIN32 bug
     ::SetForegroundWindow ((HWND) win->GetHWND ());
 
-    rval = win->PopupMenu(menu, 0, 0);
+    bool rval = win->PopupMenu(menu, 0, 0);
 
     // Work around a WIN32 bug
     ::PostMessage ((HWND) win->GetHWND(),WM_NULL,0,0L);
@@ -239,7 +236,7 @@ void wxTaskBarIcon::_OnRButtonDClick(wxEvent& e)  { OnRButtonDClick(e); }
 
 wxTaskBarIcon* wxTaskBarIcon::FindObjectForHWND(WXHWND hWnd)
 {
-    wxTaskBarIconList::Node *node = sm_taskBarIcons.GetFirst();
+    wxTaskBarIconList::compatibility_iterator node = sm_taskBarIcons.GetFirst();
     while (node)
     {
         wxTaskBarIcon *obj = node->GetData();