From 19def5e7e6c56ed174e0db5be4c5f56445e9481b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 4 Dec 2006 17:05:29 +0000 Subject: [PATCH] fix (harmless) assert in virtual list control under Vista git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + src/msw/listctrl.cpp | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 9ea86c3eed..11bc47260c 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -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: diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index f90acc0439..1f2237b980 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -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; } -- 2.45.2