Listview W5

Dimitrie O. Paun dpaun at rogers.com
Tue Oct 22 20:10:15 CDT 2002


Aparently, we're not supposed to callback to the parent
for lParam when in LVS_OWNERDATA. Very strange, but it
kindda makes some sense. Anyhow, it fixes Ender's IDA
app.

ChangeLog
  Do not callback to the parent for lParam when in LVS_OWNERDATA.
  Docs update.

--- dlls/comctl32/listview.c.Wm	Tue Oct 22 19:09:46 2002
+++ dlls/comctl32/listview.c	Tue Oct 22 21:05:45 2002
@@ -59,7 +59,12 @@
  *   -- we should keep an ordered array of coordinates in iconic mode
  *      this would allow to frame items (iterator_frameditems),
  *      and find nearest item (LVFI_NEARESTXY) a lot more efficiently
- *   
+ *
+ * Flags
+ *   -- LVIF_COLUMNS
+ *   -- LVIF_GROUPID
+ *   -- LVIF_NORECOMPUTE
+ *
  * States
  *   -- LVIS_ACTIVATING (not currently supported by comctl32.dll version 6.0)
  *   -- LVIS_CUT
@@ -4757,12 +4762,12 @@
     {
 	dispInfo.item.state = 0;
 
-	/* if we need to callback, do it now */
-	if ((lpLVItem->mask & ~LVIF_STATE) || infoPtr->uCallbackMask)
+	/* apprently, we should not callback for lParam in LVS_OWNERDATA */
+	if ((lpLVItem->mask & ~(LVIF_STATE | LVIF_PARAM)) || infoPtr->uCallbackMask)
 	{
 	    /* NOTE: copy only fields which we _know_ are initialized, some apps
 	     *       depend on the uninitialized fields being 0 */
-	    dispInfo.item.mask = lpLVItem->mask;
+	    dispInfo.item.mask = lpLVItem->mask & ~LVIF_PARAM;
 	    dispInfo.item.iItem = lpLVItem->iItem;
 	    dispInfo.item.iSubItem = lpLVItem->iSubItem;
 	    if (lpLVItem->mask & LVIF_TEXT)
@@ -4777,7 +4782,10 @@
 	    *lpLVItem = dispInfo.item;
 	    TRACE("   getdispinfo(1):lpLVItem=%s\n", debuglvitem_t(lpLVItem, isW));
 	}
-
+	
+	/* make sure lParam is zeroed out */
+	if (lpLVItem->mask & LVIF_PARAM) lpLVItem->lParam = 0;
+	
 	/* we store only a little state, so if we're not asked, we're done */
 	if (!(lpLVItem->mask & LVIF_STATE) || lpLVItem->iSubItem) return TRUE;
 
 


-- 
Dimi.




More information about the wine-patches mailing list