]> git.saurik.com Git - wxWidgets.git/commitdiff
fix (harmless) assert in virtual list control under Vista
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 4 Dec 2006 17:05:29 +0000 (17:05 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 4 Dec 2006 17:05:29 +0000 (17:05 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/msw/listctrl.cpp

index 9ea86c3eed7638c7ed40ef4eaae4540a0696f54e..11bc47260cb865d00d8623f70b4f2e59b2a95991 100644 (file)
@@ -104,6 +104,7 @@ wxMSW:
 
 - Fixed version script problems when using configure with cygwin/mingw32.
 - Use system default paper size for printing instead of A4.
+- Fix (harmless) assert in virtual list control under Vista
 - Fix colours when converting wxBitmap with alpha to wxImage (nusi).
 
 wxGTK:
index f90acc043919d6183c90bb19a9b00c8107c9290f..1f2237b98037ee7f9044406423ba9ec60b7b0d66 100644 (file)
@@ -2316,10 +2316,13 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
                     }
 #endif // NM_CUSTOMDRAW
 
-                    // a little dose of healthy paranoia: as we never use
-                    // LVM_SETCALLBACKMASK we're not supposed to get these ones
-                    wxASSERT_MSG( !(lvi.mask & LVIF_STATE),
-                                  _T("we don't support state callbacks yet!") );
+                    // even though we never use LVM_SETCALLBACKMASK, we still
+                    // can get messages with LVIF_STATE in lvi.mask under Vista
+                    if ( lvi.mask & LVIF_STATE )
+                    {
+                        // we don't have anything to return from here...
+                        lvi.stateMask = 0;
+                    }
 
                     return true;
                 }