From a770cd8d797a20a8dada4547328acdb494934bf1 Mon Sep 17 00:00:00 2001 From: Kolya Kosenko Date: Thu, 13 Jul 2017 23:02:03 +0200 Subject: [PATCH] Fix wxIconBundle::AddIcon() compilation in wxGTK/Win32 This function doesn't compile currently because CreateFromHICON() is wxMSW-only, so disable it it to at least let wxGTK compile for now, even if the real solution would be to implement CreateFromHICON() for wxGTK too. Closes #17875. --- src/common/iconbndl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/iconbndl.cpp b/src/common/iconbndl.cpp index 0cb757dc60..764e8e6185 100644 --- a/src/common/iconbndl.cpp +++ b/src/common/iconbndl.cpp @@ -216,6 +216,7 @@ void wxIconBundle::AddIcon(wxInputStream& stream, wxBitmapType type) // stored as an MS Windows resource. void wxIconBundle::AddIcon(const wxString& resourceName, WXHINSTANCE module) { +#ifdef __WXMSW__ const void* data = NULL; size_t outLen = 0; @@ -249,6 +250,9 @@ void wxIconBundle::AddIcon(const wxString& resourceName, WXHINSTANCE module) wxLogDebug(wxS("Failed to load icon with id %u for group icon resource '%s'."), iconID, resourceName); } } +#else + wxLogError(wxS("Loading icons from resources isn't implemented in this toolkit port yet.")); +#endif } #endif // defined(__WINDOWS__) && wxUSE_ICO_CUR