Fix setting alpha flag of wxBitmap created from HBITMAP

If HBITMAP represents 32-bit bitmap we need to check if this is a bitmap with transparency (ARGB) or maybe RGB only (0RBG) and set alpha flag accordingly.

Closes #18798.
This commit is contained in:
Artur Wieczorek
2020-12-28 14:05:56 +01:00
parent 23c7805742
commit 34fd2bc030

View File

@@ -1352,6 +1352,7 @@ bool wxBitmap::InitFromHBITMAP(WXHBITMAP bmp, int width, int height, int depth)
GetBitmapData()->m_width = width;
GetBitmapData()->m_height = height;
GetBitmapData()->m_depth = depth;
GetBitmapData()->m_hasAlpha = (depth == 32) && CheckAlpha(bmp);
return IsOk();
}