Hi all
Since my original patch [1] from February, 26th was not applied to the
repository, I resend this patch request again now.
History:
Original posting from me was [1]. Matej Spiller-Muys found the same problem
for a diffrent program, see postings [2] and [3].
Problem description:
Matej Spiller-Muys in [2]: "In MSDN it says that last column should never
be deleted ... but under WinXP I'm able to delete last column without any
problems."
As described for WinXP, this applies to WinNT4 for me, too. If all columns
are removed (even though against documentation) LISTVIEW_ScrollColumns()
calls LISTVIEW_GetColumnInfo() with column index -1 which makes the assert on
it fail...
Affected applications:
- StarBase's StarTeam 4.2
- UltimateZip
Resolution:
Attached updated diff based on snapshot 20030709 fixes the problem.
Changelog:
* dlls/comctl32/listview.c
Stefan Haller <sh_at_grep.ch>
- Ignoring LISTVIEW_ScrollColumns() request if no columns in list
References:
[1] http://www.winehq.org/hypermail/wine-patches/2003/02/0212.html
[2] http://www.winehq.org/hypermail/wine-devel/2003/06/0312.html
[3] http://www.winehq.org/hypermail/wine-devel/2003/06/0317.html
Cheers
Stefan Haller
diff -urN wine-20030709/dlls/comctl32/listview.c wine-20030709-modified/dlls/comctl32/listview.c
--- wine-20030709/dlls/comctl32/listview.c Wed Jul 9 04:52:58 2003
+++ wine-20030709-modified/dlls/comctl32/listview.c Tue Jul 22 18:29:17 2003
@@ -4052,6 +4052,7 @@
RECT rcOld, rcCol;
INT nCol;
+ if (nColumn < 0 || infoPtr->hdpaColumns->nItemCount < 1) return;
lpColumnInfo = LISTVIEW_GetColumnInfo(infoPtr, min(nColumn, infoPtr->hdpaColumns->nItemCount - 1));
rcCol = lpColumnInfo->rcHeader;
if (nColumn >= infoPtr->hdpaColumns->nItemCount)