]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/imaglist.cpp
missing event.Skip() added (it was impossible to use mouse without it...)
[wxWidgets.git] / src / msw / imaglist.cpp
index 4cd16e46c2ae1ed67645240178ff2408ffd0cfa1..89ff4b11ecf5604da1a62b6aba46a9c6689818ff 100644 (file)
@@ -232,13 +232,16 @@ bool wxImageList::Remove(int index)
 // Remove all images
 bool wxImageList::RemoveAll()
 {
 // Remove all images
 bool wxImageList::RemoveAll()
 {
-    bool ok = ImageList_RemoveAll(GetHImageList()) != 0;
-    if ( !ok )
+    // don't use ImageList_RemoveAll() because mingw32 headers don't have it
+    int count = ImageList_GetImageCount(GetHImageList());
+    for ( int i = 0; i < count; i++ )
     {
     {
-        wxLogLastError("ImageList_RemoveAll()");
+        // the image indexes are shifted, so we should always remove the first
+        // one
+        (void)Remove(0);
     }
 
     }
 
-    return ok;
+    return TRUE;
 }
 
 // Draws the given image on a dc at the specified position.
 }
 
 // Draws the given image on a dc at the specified position.