]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/icon.cpp
Changed order of #ifdefs to get native version on OS/2, even if
[wxWidgets.git] / src / os2 / icon.cpp
index ffece6b1f3b98490e56b182e0b34f28279298318..d3d3f49313996ca6a582ffc70e99f1d76268ef0d 100644 (file)
@@ -29,9 +29,7 @@
 
 #include "wx/icon.h"
 
 
 #include "wx/icon.h"
 
-#if !USE_SHARED_LIBRARIES
     IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxIconBase)
     IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxIconBase)
-#endif
 
 // ============================================================================
 // implementation
 
 // ============================================================================
 // implementation
@@ -43,8 +41,8 @@
 
 void wxIconRefData::Free()
 {
 
 void wxIconRefData::Free()
 {
-    if ( m_hIcon )
-        ::DestroyIcon((HICON) m_hIcon);
+    if (m_hIcon)
+        ::WinFreeFileIcon((HPOINTER)m_hIcon);
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
@@ -88,7 +86,8 @@ bool wxIcon::LoadFile(
 , int                               nDesiredHeight
 )
 {
 , int                               nDesiredHeight
 )
 {
-    wxGDIImageHandler*              pHandler = FindHandler(type);
+    wxGDIImageHandler*              pHandler = FindHandler(lType);
+    HPS                             hPs = NULLHANDLE;
 
     UnRef();
     m_refData = new wxIconRefData;
 
     UnRef();
     m_refData = new wxIconRefData;
@@ -96,6 +95,7 @@ bool wxIcon::LoadFile(
     if (pHandler)
         return(pHandler->Load( this
                               ,rFilename
     if (pHandler)
         return(pHandler->Load( this
                               ,rFilename
+                              ,hPs
                               ,lType
                               ,nDesiredWidth
                               ,nDesiredHeight
                               ,lType
                               ,nDesiredWidth
                               ,nDesiredHeight