Re: Added the callback item processing for LISTVIEW_EndEditLabelT function.
Added the callback item processing for LISTVIEW_EndEditLabelT function.
I think this would be a bit more explicit and correct (is_textW() returns false if pszText == NULL) if the test is the other way around: + if (lpItem && lpItem->hdr.pszText == LPSTR_TEXTCALLBACKW) + { + LISTVIEW_InvalidateItem(infoPtr, infoPtr->nEditLabelItem); + } + else + { + ZeroMemory(&dispInfo, sizeof(dispInfo)); + dispInfo.item.mask = LVIF_TEXT; + dispInfo.item.iItem = infoPtr->nEditLabelItem; + dispInfo.item.iSubItem = 0; + dispInfo.item.pszText = pszText; + dispInfo.item.cchTextMax = textlenT(pszText, isW); + return LISTVIEW_SetItemT(infoPtr, &dispInfo.item, isW); + } -- Dimi.
2005-05-19 Kouji Sasaki <taro-x(a)justsystem.co.jp>
Added the callback item processing for LISTVIEW_EndEditLabelT function.
I think this would be a bit more explicit and correct (is_textW() returns false if pszText == NULL) if the test is the other way around:
+ if (lpItem && lpItem->hdr.pszText == LPSTR_TEXTCALLBACKW) + { + LISTVIEW_InvalidateItem(infoPtr, infoPtr->nEditLabelItem); + } + else + { + ZeroMemory(&dispInfo, sizeof(dispInfo)); + dispInfo.item.mask = LVIF_TEXT; + dispInfo.item.iItem = infoPtr->nEditLabelItem; + dispInfo.item.iSubItem = 0; + dispInfo.item.pszText = pszText; + dispInfo.item.cchTextMax = textlenT(pszText, isW); + return LISTVIEW_SetItemT(infoPtr, &dispInfo.item, isW); + }
-- Dimi.
I will send the patch with your modifications, as your one works perfectly and is more explicit and easier to read. Changelog: * dlls/comctl32/listview.c Added the callback item processing for LISTVIEW_EndEditLabelT function. -- Justsystem Corporation <taro-x(a)justsystem.co.jp>
participants (2)
-
Dimitrie Paun -
taro-x@justsystem.co.jp