Listview X5
Dimitrie O. Paun
dpaun at rogers.com
Thu Oct 24 01:26:16 CDT 2002
Another fine automobile... ;)
Apparently, if you didn't set a subitem, you still get
a callback ... This fixes subitems in Newsbin Pro.
Also, now it makes a bit more sense why the docs says
that we shouldn't store subitem information (it's buried
somewhere...)
ChangeLog
We should callback for inexistent subitems
Do not store callback items for subitems, even if we're asked to
Small cleanup.
--- dlls/comctl32/listview.c.X4 Thu Oct 24 01:49:58 2002
+++ dlls/comctl32/listview.c Thu Oct 24 02:19:48 2002
@@ -3073,7 +3073,7 @@
item.stateMask = ~0;
item.state = 0;
item.lParam = 0;
- if (!isNew && !LISTVIEW_GetItemT(infoPtr, &item, TRUE)) return FALSE;
+ if (!isNew && !LISTVIEW_GetItemW(infoPtr, &item)) return FALSE;
TRACE("oldState=%x, newState=%x\n", item.state, lpLVItem->state);
/* determine what fields will change */
@@ -4723,6 +4723,7 @@
*/
static BOOL LISTVIEW_GetItemT(LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, BOOL isW)
{
+ ITEMHDR callbackHdr = { LPSTR_TEXTCALLBACKW, I_IMAGECALLBACK };
NMLVDISPINFOW dispInfo;
ITEM_INFO *lpItem;
ITEMHDR* pItemHdr;
@@ -4808,8 +4809,7 @@
if (lpLVItem->iSubItem)
{
SUBITEM_INFO *lpSubItem = LISTVIEW_GetSubItemPtr(hdpaSubItems, lpLVItem->iSubItem);
- if(!lpSubItem) return FALSE;
- pItemHdr = &lpSubItem->hdr;
+ pItemHdr = lpSubItem ? &lpSubItem->hdr : &callbackHdr;
}
else
pItemHdr = &lpItem->hdr;
@@ -4845,6 +4845,9 @@
TRACE(" getdispinfo(2):item=%s\n", debuglvitem_t(&dispInfo.item, isW));
}
+ /* we should not store values for subitems */
+ if (lpLVItem->iSubItem) dispInfo.item.mask &= ~LVIF_DI_SETITEM;
+
/* Now, handle the iImage field */
if (dispInfo.item.mask & LVIF_IMAGE)
{
--
Dimi.
More information about the wine-patches
mailing list