Commit b7ffa867 authored by Lei Zhang's avatar Lei Zhang Committed by Alexandre Julliard

user32: Add edit control check to see if its in a dialog on WM_CHAR/VK_TAB.

parent f704d5c6
......@@ -861,11 +861,6 @@ static LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg,
}
}
}
else
{
if (charW == VK_TAB)
break;
}
result = EDIT_WM_Char(es, charW);
break;
}
......@@ -4050,6 +4045,8 @@ static LRESULT EDIT_WM_Char(EDITSTATE *es, WCHAR c)
if ((es->style & ES_MULTILINE) && !(es->style & ES_READONLY))
{
static const WCHAR tabW[] = {'\t',0};
if (EDIT_IsInsideDialog(es))
break;
EDIT_EM_ReplaceSel(es, TRUE, tabW, TRUE, TRUE);
}
break;
......
......@@ -1719,15 +1719,13 @@ static void test_tab(void)
ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r);
r = SendMessage(hwEdit, WM_CHAR, VK_TAB, 0);
todo_wine ok(1 == r, "Expected: %d, got: %d\n", 1, r);
ok(1 == r, "Expected: %d, got: %d\n", 1, r);
/* get text */
buffer[0] = 0;
r = SendMessage(hwEdit, WM_GETTEXT, 16, (LPARAM) buffer);
todo_wine {
ok(1 == r, "Expected: %d, got len %d\n", 1, r);
ok(0 == strcmp(buffer, "\t"), "expected \"\\t\", got \"%s\"\n", buffer);
}
DestroyWindow (hwEdit);
......@@ -1741,7 +1739,7 @@ static void test_tab(void)
ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r);
r = SendMessage(hwEdit, WM_CHAR, VK_TAB, 0);
todo_wine ok(1 == r, "Expected: %d, got: %d\n", 1, r);
ok(1 == r, "Expected: %d, got: %d\n", 1, r);
/* get text */
buffer[0] = 0;
......
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