]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/statbmp.cpp
Applied patch from Neil Robinson to allow manipulation of unattached menubars
[wxWidgets.git] / src / msw / statbmp.cpp
index f1f3fcee47e5858ad6132aaa17ba7b32c7481d14..c321fe5f73c680ad9b7c27fbffe178b9c2b30908 100644 (file)
@@ -273,12 +273,12 @@ void wxStaticBitmap::SetImageNoCopy( wxGDIImage* image)
                   m_isIcon ? IMAGE_ICON : IMAGE_BITMAP, (LPARAM)handle);
     // detect if this is still the handle we passed before or
     // if the static-control made a copy of the bitmap!
-    if (m_currentHandle != 0 && oldHandle != m_currentHandle)
+    if (m_currentHandle != 0 && oldHandle != (HGDIOBJ) m_currentHandle)
     {
         // the static control made a copy and we are responsible for deleting it
-        DeleteObject(oldHandle);      
+        DeleteObject((HGDIOBJ) oldHandle);      
     }
-    m_currentHandle = (HGDIOBJ)handle;                         
+    m_currentHandle = (WXHANDLE)handle;                        
 #endif // Win32
 
     if ( ImageIsOk() )