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

This commit is contained in:
Lei Zhang 2008-04-09 11:33:32 -07:00 committed by Alexandre Julliard
parent f704d5c699
commit b7ffa86725
2 changed files with 4 additions and 9 deletions

View File

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

View File

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