- case LVN_BEGINDRAG:
- case LVN_BEGINRDRAG:
- case LVN_COLUMNCLICK:
- case LVN_ITEMCHANGED:
- case LVN_ITEMCHANGING:
- if ( iItem != -1 )
- {
- if ( iItem >= GetItemCount() )
- {
- // there is apparently a bug in comctl32.dll version
- // 5.50.4704.1100 (note that the MS DLL database
- // doesn't say what this version is, it's not the one
- // shipped with W2K although the bug was reported under
- // that system) and it sends us LVN_ITEMCHANGING
- // notifications with the item out of range -- and as
- // we access the items client data, we crash below
- //
- // see
- //
- // http://lists.wxwindows.org/cgi-bin/ezmlm-cgi?8:mss:29852:knlihdmadhaljafjajei
- //
- // and the thread continuation for more details
- // (although note that the bug may be present in other
- // versions of comctl32.dll as well as it has been
- // reported quite a few times)
- //
- // to fix this, simply ignore these "bad" events (as
- // above with HDN_GETDISPINFOW)
- return TRUE;
- }