Alien-wxWidgets

 view release on metacpan or  search on metacpan

patches/wxMSW-2.8.12-w64.patch  view on Meta::CPAN

     wxCATCH_ALL( wxTheApp->OnUnhandledException(); )
 
@@ -684,7 +684,7 @@
     // from Wait()) or ask it to terminate (when called from Delete())
     bool shouldDelete = threadToDelete != NULL;
 
-    wxThread::ExitCode rc = 0;
+    DWORD rc = 0;
 
     // we might need to resume the thread if it's currently stopped
     bool shouldResume = false;
@@ -837,12 +837,12 @@
         {
             wxLogLastError(wxT("GetExitCodeThread"));
 
-            rc = (wxThread::ExitCode)-1;
+            rc = (THREAD_RETVAL)-1;
 
             break;
         }
 
-        if ( (DWORD)rc != STILL_ACTIVE )
+        if ( rc != STILL_ACTIVE )
             break;
 
         // give the other thread some time to terminate, otherwise we may be
@@ -851,14 +851,14 @@
     }
 
     if ( pRc )
-        *pRc = rc;
+        *pRc = wxUIntToPtr(rc);
 
     // we don't need the thread handle any more in any case
     Free();
 
 
-    return rc == (wxThread::ExitCode)-1 ? wxTHREAD_MISC_ERROR
-                                        : wxTHREAD_NO_ERROR;
+    return rc == (THREAD_RETVAL)-1 ? wxTHREAD_MISC_ERROR
+                                   : wxTHREAD_NO_ERROR;
 }
 
 bool wxThreadInternal::Suspend()
@@ -1162,7 +1162,7 @@
     }
 
 #ifdef wxUSE_BEGIN_THREAD
-    _endthreadex((unsigned)status);
+    _endthreadex(wxPtrToUInt(status));
 #else // !VC++
     ::ExitThread((DWORD)status);
 #endif // VC++/!VC++
Index: src/msw/frame.cpp
===================================================================
--- src/msw/frame.cpp	(revisione 63679)
+++ src/msw/frame.cpp	(copia locale)
@@ -855,7 +855,8 @@
             HDC hdc = ::BeginPaint(GetHwnd(), &ps);
 
             // Erase background before painting or we get white background
-            MSWDefWindowProc(WM_ICONERASEBKGND, (WORD)(LONG)ps.hdc, 0L);
+            // Commented out: according to MSDN it's only needed on NT 3.51
+            // MSWDefWindowProc(WM_ICONERASEBKGND, (WORD)(LONG)ps.hdc, 0L);
 
             if ( hIcon )
             {
@@ -1080,7 +1081,7 @@
                 const wxIcon& icon = GetIcon();
                 HICON hIcon = icon.Ok() ? GetHiconOf(icon)
                                         : (HICON)GetDefaultIcon();
-                rc = (long)hIcon;
+                rc = (WXLRESULT)hIcon;
                 processed = rc != 0;
             }
             break;
Index: src/msw/pen.cpp
===================================================================
--- src/msw/pen.cpp	(revisione 63679)
+++ src/msw/pen.cpp	(copia locale)
@@ -172,7 +172,7 @@
            case wxSTIPPLE:
                logb.lbStyle = BS_PATTERN ;
                if (M_PENDATA->m_stipple.Ok())
-                   logb.lbHatch = (LONG)M_PENDATA->m_stipple.GetHBITMAP();
+                   logb.lbHatch = wxPtrToUInt(M_PENDATA->m_stipple.GetHBITMAP());
                else
                    logb.lbHatch = (LONG)0;
                break;
Index: src/msw/helpwin.cpp
===================================================================
--- src/msw/helpwin.cpp	(revisione 63679)
+++ src/msw/helpwin.cpp	(copia locale)
@@ -98,7 +98,7 @@
 
     wxString str = GetValidFilename(m_helpFile);
 
-    return (WinHelp(GetSuitableHWND(this), (const wxChar*) str, HELP_PARTIALKEY, (DWORD)(const wxChar*) k) != 0);
+    return (WinHelp(GetSuitableHWND(this), (const wxChar*) str, HELP_PARTIALKEY, (ULONG_PTR)(const wxChar*) k) != 0);
 }
 
 // Can't close the help window explicitly in WinHelp
Index: src/msw/printdlg.cpp
===================================================================
--- src/msw/printdlg.cpp	(revisione 63679)
+++ src/msw/printdlg.cpp	(copia locale)
@@ -175,10 +175,10 @@
 
 wxWindowsPrintNativeData::~wxWindowsPrintNativeData()
 {
-    HGLOBAL hDevMode = (HGLOBAL)(DWORD) m_devMode;
+    HGLOBAL hDevMode = (HGLOBAL) m_devMode;
     if ( hDevMode )
         GlobalFree(hDevMode);
-    HGLOBAL hDevNames = (HGLOBAL)(DWORD) m_devNames;
+    HGLOBAL hDevNames = (HGLOBAL) m_devNames;
     if ( hDevNames )
         GlobalFree(hDevNames);
 }
@@ -190,8 +190,8 @@
 



( run in 0.424 second using v1.01-cache-2.11-cpan-f56aa216473 )