Fix setting color depth of wxBitmap created from HBITMAP

When HBITMAP is assigned to wxBitmap with SetHBITMAP(), internal data
member representing wxBitmap's color depth should be set afterwards to
the bitmap color depth, not to the number of planes.
This commit is contained in:
Artur Wieczorek
2017-05-03 16:04:05 +02:00
parent dd4a9de048
commit 1da74cbcd2
3 changed files with 5 additions and 4 deletions

View File

@@ -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;
}