X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/419430a0c006cd6830c2c8a768ba850531ec6a18..b7ceceb1861d7583c0a544c608fcf583367e6e92:/src/msw/gdiimage.cpp diff --git a/src/msw/gdiimage.cpp b/src/msw/gdiimage.cpp index d5b356119e..26cabaa71c 100644 --- a/src/msw/gdiimage.cpp +++ b/src/msw/gdiimage.cpp @@ -356,6 +356,9 @@ bool wxBMPResourceHandler::LoadFile(wxBitmap *bitmap, bitmap->SetHeight(bm.bmHeight); bitmap->SetDepth(bm.bmBitsPixel); + // use 0xc0c0c0 as transparent colour by default + bitmap->SetMask(new wxMask(*bitmap, *wxLIGHT_GREY)); + return true; } @@ -369,7 +372,8 @@ bool wxBMPFileHandler::LoadFile(wxBitmap *bitmap, wxDIB dib(name); - return dib.IsOk() && bitmap->CopyFromDIB(dib); + bool ok = dib.IsOk() && bitmap->CopyFromDIB(dib); + return ok; #else WXHBITMAP hBitmap = (WXHBITMAP)wxLoadBMP(name); if(hBitmap) {