comctl32: Implement treeview edit control EM_SETLIMITTEXT.

Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Damjan Jovanovic 2019-11-13 05:54:04 +02:00 committed by Alexandre Julliard
parent 6fb210d7b4
commit 5e2e794ad6
2 changed files with 2 additions and 1 deletions

View File

@ -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);

View File

@ -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);