comctl32: cchTextMax needs to be set for LVS_OWNERDATA as it uses LVN_GETDISPINFO notifications.

This commit is contained in:
Jeff Latimer 2010-03-16 00:08:29 +11:00 committed by Alexandre Julliard
parent af28d72aaf
commit 4f20455e4c
1 changed files with 4 additions and 1 deletions

View File

@ -5635,6 +5635,7 @@ static BOOL LISTVIEW_DeleteItem(LISTVIEW_INFO *infoPtr, INT nItem)
static BOOL LISTVIEW_EndEditLabelT(LISTVIEW_INFO *infoPtr, BOOL storeText, BOOL isW) static BOOL LISTVIEW_EndEditLabelT(LISTVIEW_INFO *infoPtr, BOOL storeText, BOOL isW)
{ {
HWND hwndSelf = infoPtr->hwndSelf; HWND hwndSelf = infoPtr->hwndSelf;
WCHAR szDispText[DISP_TEXT_SIZE] = { 0 };
NMLVDISPINFOW dispInfo; NMLVDISPINFOW dispInfo;
INT editedItem = infoPtr->nEditLabelItem; INT editedItem = infoPtr->nEditLabelItem;
BOOL bSame; BOOL bSame;
@ -5665,7 +5666,9 @@ static BOOL LISTVIEW_EndEditLabelT(LISTVIEW_INFO *infoPtr, BOOL storeText, BOOL
dispInfo.item.iItem = editedItem; dispInfo.item.iItem = editedItem;
dispInfo.item.iSubItem = 0; dispInfo.item.iSubItem = 0;
dispInfo.item.stateMask = ~0; dispInfo.item.stateMask = ~0;
if (!LISTVIEW_GetItemW(infoPtr, &dispInfo.item)) dispInfo.item.pszText = szDispText;
dispInfo.item.cchTextMax = DISP_TEXT_SIZE;
if (!LISTVIEW_GetItemT(infoPtr, &dispInfo.item, isW))
{ {
res = FALSE; res = FALSE;
goto cleanup; goto cleanup;