Commit 2ef02afe authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

comctl32: Fix callback in treeview.

parent 9b0be498
...@@ -311,7 +311,7 @@ static void TestCallback(void) ...@@ -311,7 +311,7 @@ static void TestCallback(void)
ok(ret == 1, "Expected SetItem return 1, got %ld\n", ret); ok(ret == 1, "Expected SetItem return 1, got %ld\n", ret);
tvi.pszText = buf; tvi.pszText = buf;
TreeView_GetItem(hTree, &tvi); TreeView_GetItem(hTree, &tvi);
todo_wine ok(strcmp(tvi.pszText, TEST_CALLBACK_TEXT) == 0, "Item text mismatch %s vs %s\n", ok(strcmp(tvi.pszText, TEST_CALLBACK_TEXT) == 0, "Item text mismatch %s vs %s\n",
tvi.pszText, TEST_CALLBACK_TEXT); tvi.pszText, TEST_CALLBACK_TEXT);
U(ins).item.pszText = NULL; U(ins).item.pszText = NULL;
...@@ -320,7 +320,7 @@ static void TestCallback(void) ...@@ -320,7 +320,7 @@ static void TestCallback(void)
tvi.hItem = hItem2; tvi.hItem = hItem2;
memset(buf, 0, sizeof(buf)); memset(buf, 0, sizeof(buf));
TreeView_GetItem(hTree, &tvi); TreeView_GetItem(hTree, &tvi);
todo_wine ok(strcmp(tvi.pszText, TEST_CALLBACK_TEXT) == 0, "Item text mismatch %s vs %s\n", ok(strcmp(tvi.pszText, TEST_CALLBACK_TEXT) == 0, "Item text mismatch %s vs %s\n",
tvi.pszText, TEST_CALLBACK_TEXT); tvi.pszText, TEST_CALLBACK_TEXT);
} }
......
...@@ -1112,7 +1112,7 @@ TREEVIEW_DoSetItemT(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem, ...@@ -1112,7 +1112,7 @@ TREEVIEW_DoSetItemT(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
if (tvItem->mask & TVIF_TEXT) if (tvItem->mask & TVIF_TEXT)
{ {
wineItem->textWidth = 0; /* force width recalculation */ wineItem->textWidth = 0; /* force width recalculation */
if (tvItem->pszText != LPSTR_TEXTCALLBACKW) /* covers != TEXTCALLBACKA too */ if (tvItem->pszText != LPSTR_TEXTCALLBACKW && tvItem->pszText != NULL) /* covers != TEXTCALLBACKA too, and undocumented: pszText of NULL also means TEXTCALLBACK */
{ {
int len; int len;
LPWSTR newText; LPWSTR newText;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment