diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index 8d12ce9070..3ac130dbd9 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -1630,7 +1630,7 @@ wxBitmap wxMask::GetBitmap() const wxBitmap bmp; bmp.SetHBITMAP((WXHBITMAP)hNewBitmap); bmp.SetSize(bm.bmWidth, bm.bmHeight); - bmp.SetDepth(bm.bmPlanes); + bmp.SetDepth(bm.bmBitsPixel); return bmp; } diff --git a/src/msw/clipbrd.cpp b/src/msw/clipbrd.cpp index 1cab19ba1b..854d20a1c2 100644 --- a/src/msw/clipbrd.cpp +++ b/src/msw/clipbrd.cpp @@ -478,7 +478,7 @@ void *wxGetClipboardData(wxDataFormat dataFormat, long *len) wxBM->SetHBITMAP((WXHBITMAP) hNewBitmap); wxBM->SetWidth(bm.bmWidth); wxBM->SetHeight(bm.bmHeight); - wxBM->SetDepth(bm.bmPlanes); + wxBM->SetDepth(bm.bmBitsPixels); retval = wxBM; break; } diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index 9807b50c45..870fd71f4f 100644 --- a/src/msw/ole/dataobj.cpp +++ b/src/msw/ole/dataobj.cpp @@ -1122,7 +1122,7 @@ bool wxBitmapDataObject2::SetData(size_t WXUNUSED(len), const void *pBuf) wxLogLastError(wxT("GetObject(HBITMAP)")); } - wxBitmap bitmap(bmp.bmWidth, bmp.bmHeight, bmp.bmPlanes); + wxBitmap bitmap(bmp.bmWidth, bmp.bmHeight, bmp.bmBitsPixel); bitmap.SetHBITMAP((WXHBITMAP)hbmp); if ( !bitmap.IsOk() ) { @@ -1231,6 +1231,7 @@ bool wxBitmapDataObject::SetData(const wxDataFormat& format, m_bitmap.SetWidth(pbmih->biWidth); m_bitmap.SetHeight(pbmih->biHeight); + m_bitmap.SetDepth(pbmih->biBitCount); } else // CF_BITMAP { @@ -1245,7 +1246,7 @@ bool wxBitmapDataObject::SetData(const wxDataFormat& format, m_bitmap.SetWidth(bmp.bmWidth); m_bitmap.SetHeight(bmp.bmHeight); - m_bitmap.SetDepth(bmp.bmPlanes); + m_bitmap.SetDepth(bmp.bmBitsPixel); } m_bitmap.SetHBITMAP((WXHBITMAP)hbmp);