X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e3c12d77459f08076de2ca101eb660f675bbd3a..46a5010a06b09318878c33a0a6a532f419ea063d:/src/msw/bitmap.cpp diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index 039c3b8e93..dd6423fff7 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -790,7 +790,9 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc ) HBITMAP hbitmap; // are we going to use DIB? - if ( wxShouldCreateDIB(w, h, depth, hdc) ) + // + // NB: DDBs don't support alpha so if we have alpha channel we must use DIB + if ( image.HasAlpha() || wxShouldCreateDIB(w, h, depth, hdc) ) { // don't delete the DIB section in dib object dtor hbitmap = dib.Detach();