]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/statbmp.cpp
make IsEnabled() return false even if the window parent, and not the window itself...
[wxWidgets.git] / src / msw / statbmp.cpp
index f1f3fcee47e5858ad6132aaa17ba7b32c7481d14..cd03008f89e66d50df44c2d1c863af9ed8b4644f 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        statbmp.cpp
+// Name:        src/msw/statbmp.cpp
 // Purpose:     wxStaticBitmap
 // Author:      Julian Smart
 // Modified by:
 
 #if wxUSE_STATBMP
 
-#include "wx/window.h"
-#include "wx/msw/private.h"
+#include "wx/statbmp.h"
 
 #ifndef WX_PRECOMP
+    #include "wx/window.h"
     #include "wx/icon.h"
-    #include "wx/statbmp.h"
 #endif
 
+#include "wx/msw/private.h"
+
 #include "wx/sysopt.h"
 
 #include <stdio.h>
@@ -165,7 +166,7 @@ bool wxStaticBitmap::Create(wxWindow *parent,
     SetImageNoCopy(image);
 
     // GetBestSize will work properly now, so set the best size if needed
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
@@ -273,12 +274,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() )
@@ -303,4 +304,3 @@ void wxStaticBitmap::SetImageNoCopy( wxGDIImage* image)
 }
 
 #endif // wxUSE_STATBMP
-