From 254e1afea58c0f5af76f6024c007070ecc2d4fe7 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 10 Apr 2022 14:17:33 +0200 Subject: [PATCH] Create wxBitmap compatible with wxDC only for wxMSW Ctor creating wxBitmap compatible with wxDC is available only for wxMSW. --- src/propgrid/advprops.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index c8cfcfd91e..5db4043014 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -1891,7 +1891,11 @@ void wxImageFileProperty::OnCustomPaint( wxDC& dc, { wxImage imgScaled = m_image; imgScaled.Rescale(rect.width, rect.height); +#ifdef __WSMSW__ m_bitmap = wxBitmap(imgScaled, dc); +#else + m_bitmap = wxBitmap(imgScaled); +#endif } }