diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index 16fe42092c..780d12cb74 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -1204,7 +1204,13 @@ wxDC *wxBitmap::GetSelectedInto() const void wxBitmap::UseAlpha(bool use) { if ( GetBitmapData() ) + { + // Only 32bpp bitmaps can contain alpha channel. + if ( use && GetBitmapData()->m_depth < 32 ) + use = false; + GetBitmapData()->m_hasAlpha = use; + } } bool wxBitmap::HasAlpha() const