From da195023c18d1fdc1f1ba8943edab55563846687 Mon Sep 17 00:00:00 2001 From: Kolya Kosenko Date: Wed, 9 Mar 2016 15:42:51 +0100 Subject: [PATCH] Fix wxGTK/MSW build in wxDIB. Don't define wxMSW-specific wxDIB::CreatePalette() method when not building wxMSW. Closes #17248. --- include/wx/msw/dib.h | 4 ++-- src/msw/dib.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/wx/msw/dib.h b/include/wx/msw/dib.h index b74880312b..6fb4c3eca3 100644 --- a/include/wx/msw/dib.h +++ b/include/wx/msw/dib.h @@ -79,10 +79,10 @@ public: // the DIB after this (but the caller should do it) HBITMAP Detach() { HBITMAP hbmp = m_handle; m_handle = 0; return hbmp; } -#if wxUSE_PALETTE +#if defined(__WXMSW__) && wxUSE_PALETTE // create a palette for this DIB (always a trivial/default one for 24bpp) wxPalette *CreatePalette() const; -#endif // wxUSE_PALETTE +#endif // defined(__WXMSW__) && wxUSE_PALETTE // save the DIB as a .BMP file to the file with the given name bool Save(const wxString& filename); diff --git a/src/msw/dib.cpp b/src/msw/dib.cpp index 616c59c7a4..ad4b3e0369 100644 --- a/src/msw/dib.cpp +++ b/src/msw/dib.cpp @@ -509,7 +509,7 @@ HGLOBAL wxDIB::ConvertFromBitmap(HBITMAP hbmp) // palette support // ---------------------------------------------------------------------------- -#if wxUSE_PALETTE +#if defined(__WXMSW__) && wxUSE_PALETTE wxPalette *wxDIB::CreatePalette() const { @@ -582,7 +582,7 @@ wxPalette *wxDIB::CreatePalette() const return palette; } -#endif // wxUSE_PALETTE +#endif // defined(__WXMSW__) && wxUSE_PALETTE // ---------------------------------------------------------------------------- // wxImage support