From: Václav Slavík Date: Sun, 26 Jan 2003 16:15:08 +0000 (+0000) Subject: eliminate __WIN32__ only code X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5eac771d0949d4696c7c29f2ead81a2d0b0b73c8 eliminate __WIN32__ only code git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index 0fdf57d687..1d6430340f 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -366,16 +366,11 @@ int wxFileIconsTable::GetIconID(const wxString& extension, const wxString& mime) m_HashTable.Put(extension, new wxFileIconEntry(newid)); return newid; } -#ifdef __WIN32__ - wxBitmap myBitmap (ic.GetWidth(), ic.GetHeight() ) ; - wxMemoryDC memDC; - memDC.SelectObject( myBitmap ); - memDC.DrawIcon(ic,0,0); - memDC.SelectObject( wxNullBitmap ); - wxImage img = myBitmap.ConvertToImage(); -#else - wxImage img = ic.ConvertToImage(); -#endif + + wxBitmap tmpBmp; + tmpBmp.CopyFromIcon(ic); + wxImage img = tmpBmp.ConvertToImage(); + delete ft; int id = m_ImageList.GetImageCount();