]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't use Windows handles directly in headers
authorJulian Smart <julian@anthemion.co.uk>
Thu, 19 Jan 2006 07:37:18 +0000 (07:37 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 19 Jan 2006 07:37:18 +0000 (07:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/statbmp.h
src/msw/statbmp.cpp

index a1fadbbf60904589a84145b6f47288a8e99ce984..db39bbb7bce27516efc48b39dea70b462975e1c1 100644 (file)
@@ -71,8 +71,9 @@ protected:
     // we can have either an icon or a bitmap
     bool m_isIcon;
     wxGDIImage *m_image;
+
     // handle used in last call to STM_SETIMAGE
-    HGDIOBJ m_currentHandle;
+    WXHANDLE m_currentHandle;
 
 private:
     DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
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() )