hack to _really_ fix crashes in comctl32.dll when processing HDN_GETDISPINFO
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1772,20 +1772,15 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case HDN_GETDISPINFOW:
|
case HDN_GETDISPINFOW:
|
||||||
{
|
// letting Windows XP handle this message results in mysterious
|
||||||
LPNMHDDISPINFOW info = (LPNMHDDISPINFOW) lParam;
|
// crashes in comctl32.dll seemingly because of bad message
|
||||||
// This is a fix for a strange bug under XP.
|
// parameters
|
||||||
// Normally, info->iItem is a valid index, but
|
//
|
||||||
// sometimes this is a silly (large) number
|
// I have no idea what is the real cause of the bug (which is,
|
||||||
// and when we return false via wxControl::MSWOnNotify
|
// just to make things interesting, is impossible to reproduce
|
||||||
// to indicate that it hasn't yet been processed,
|
// reliably) but ignoring all these messages does fix it and
|
||||||
// there's a GPF in Windows.
|
// doesn't seem to have any negative consequences
|
||||||
// By returning true here, we avoid further processing
|
|
||||||
// of this strange message.
|
|
||||||
if ( (unsigned)info->iItem >= (unsigned)GetColumnCount() )
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
// fall through
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return wxControl::MSWOnNotify(idCtrl, lParam, result);
|
return wxControl::MSWOnNotify(idCtrl, lParam, result);
|
||||||
|
Reference in New Issue
Block a user