X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/68f36a2ca14a0005874f3343391f85f4aa084f99..df16a53ef9ae506c51023178e4fe45ce45e69447:/src/msw/bitmap.cpp diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index 4f60c09474..9f62b5e7c0 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -107,8 +107,6 @@ void wxBitmap::Init() { // m_refData = NULL; done in the base class ctor - if ( wxTheBitmapList ) - wxTheBitmapList->AddBitmap(this); } #ifdef __WIN32__ @@ -222,8 +220,6 @@ bool wxBitmap::CopyFromIcon(const wxIcon& icon) wxBitmap::~wxBitmap() { - if (wxTheBitmapList) - wxTheBitmapList->DeleteObject(this); } wxBitmap::wxBitmap(const char bits[], int width, int height, int depth) @@ -435,8 +431,10 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth ) if (depth == -1) depth = wxDisplayDepth(); SetDepth( depth ); +#if wxUSE_PALETTE // Copy the palette from the source image SetPalette(image.GetPalette()); +#endif // wxUSE_PALETTE // create a DIB header int headersize = sizeof(BITMAPINFOHEADER); @@ -616,8 +614,6 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth ) GetBitmapData()->SetOk(); #endif // WXWIN_COMPATIBILITY_2 - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); - return TRUE; #endif } @@ -1087,7 +1083,7 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) // scan the bitmap for the transparent colour and set the corresponding // pixels in the mask to BLACK and the rest to WHITE - COLORREF maskColour = wxColourToRGB(colour); + COLORREF maskColour = RGB(colour.Red(), colour.Green(), colour.Blue()); m_maskBitmap = (WXHBITMAP)::CreateBitmap(width, height, 1, 1, 0); HDC srcDC = ::CreateCompatibleDC(NULL);