]> git.saurik.com Git - wxWidgets.git/commitdiff
disable workaround for lack of alpha support in native static bitmap control for...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 27 Oct 2008 18:15:19 +0000 (18:15 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 27 Oct 2008 18:15:19 +0000 (18:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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

index 39f6202e3ca1023ba8c1d6d3a41740e14150a521..7989fce4bc7bdc0b9c3c98261a80c485dedb116c 100644 (file)
@@ -70,9 +70,11 @@ protected:
     void SetImage(const wxGDIImage* image);
     void SetImageNoCopy( wxGDIImage* image );
 
+#ifndef __WXWINCE__
     // draw the bitmap ourselves here if the OS can't do it correctly (if it
     // can we leave it to it)
     void DoPaintManually(wxPaintEvent& event);
+#endif // !__WXWINCE__
 
 
     // we can have either an icon or a bitmap
index 17d3ea364e05bc569ddc1acb87a17febff07739e..418541bfd900bedb20b33f5fd6ca173d8119a752 100644 (file)
@@ -170,6 +170,10 @@ bool wxStaticBitmap::Create(wxWindow *parent,
     // GetBestSize will work properly now, so set the best size if needed
     SetInitialSize(size);
 
+    // painting manually is reported not to work under Windows CE (see #10093),
+    // so don't do it there even if this probably means that alpha is not
+    // supported there -- but at least bitmaps without alpha appear correctly
+#ifndef __WXWINCE__
     // Windows versions before XP (and even XP if the application has no
     // manifest and so the old comctl32.dll is used) don't draw correctly the
     // images with alpha channel so we need to draw them ourselves and it's
@@ -179,6 +183,7 @@ bool wxStaticBitmap::Create(wxWindow *parent,
     {
         Connect(wxEVT_PAINT, wxPaintEventHandler(wxStaticBitmap::DoPaintManually));
     }
+#endif // !__WXWINCE__
 
     return true;
 }
@@ -252,6 +257,8 @@ wxSize wxStaticBitmap::DoGetBestSize() const
     return wxSize(16, 16);
 }
 
+#ifndef __WXWINCE__
+
 void wxStaticBitmap::DoPaintManually(wxPaintEvent& WXUNUSED(event))
 {
     wxPaintDC dc(this);
@@ -274,6 +281,8 @@ void wxStaticBitmap::DoPaintManually(wxPaintEvent& WXUNUSED(event))
                   true /* use mask */);
 }
 
+#endif // !__WXWINCE__
+
 void wxStaticBitmap::SetImage( const wxGDIImage* image )
 {
     wxGDIImage* convertedImage = ConvertImage( *image );