[PATCH 2/7] comctl32: Implement treeview edit control EM_SETLIMITTEXT

Damjan Jovanovic damjan.jov at gmail.com
Tue Nov 12 21:54:04 CST 2019


Signed-off-by: Damjan Jovanovic <damjan.jov at gmail.com>
---
 dlls/comctl32/tests/treeview.c | 2 +-
 dlls/comctl32/treeview.c       | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
-------------- next part --------------
diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c
index 753c6b4327..2380c5796e 100644
--- a/dlls/comctl32/tests/treeview.c
+++ b/dlls/comctl32/tests/treeview.c
@@ -1674,7 +1674,7 @@ static void test_itemedit(void)
     edit = (HWND)SendMessageA(hTree, TVM_EDITLABELA, 0, (LPARAM)hRoot);
     ok(IsWindow(edit), "Expected valid handle\n");
     r = SendMessageA(edit, EM_GETLIMITTEXT, 0, 0);
-    todo_wine expect(MAX_PATH - 1, r);
+    expect(MAX_PATH - 1, r);
     r = SendMessageA(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)edit);
     expect(0, r);
 
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index 3c73964304..47623e2be2 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -3967,6 +3967,7 @@ TREEVIEW_EditLabel(TREEVIEW_INFO *infoPtr, HTREEITEM hItem)
     infoPtr->wpEditOrig = (WNDPROC)SetWindowLongPtrW(hwndEdit, GWLP_WNDPROC,
 						  (DWORD_PTR)
 						  TREEVIEW_Edit_SubclassProc);
+    SendMessageW(hwndEdit, EM_SETLIMITTEXT, MAX_PATH - 1, 0);
     if (hItem->pszText)
         SetWindowTextW(hwndEdit, hItem->pszText);
 


More information about the wine-devel mailing list