Signed-off-by: Fabian Maurer dark.shadow4@web.de --- dlls/user32/tests/msg.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 2766e7f5fb..37fdc797fe 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -7291,6 +7291,13 @@ static const struct message WMSetFocusComboBoxSeq[] = { 0 } };
+static const struct message WMEditReadonlyComboBoxSeq[] = +{ + { WM_CTLCOLORSTATIC, sent }, + { WM_CTLCOLORSTATIC, sent|optional }, /* Not sent by wine */ + { 0 } +}; + static const struct message SetFocusButtonSeq[] = { { WM_KILLFOCUS, sent }, @@ -7587,6 +7594,30 @@ static void test_combobox_messages(void)
DestroyWindow(combo); DestroyWindow(parent); + + /* Test what happens when we use EM_SETREADONLY on the edit control */ + parent = CreateWindowExA(0, "TestParentClass", "Parent", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 10, 10, 300, 300, NULL, NULL, NULL, NULL); + ok(parent != 0, "Failed to create parent window\n"); + + combo = CreateWindowExA(0, "my_combobox_class", "test", WS_CHILD | WS_VISIBLE | CBS_DROPDOWN, + 5, 5, 100, 100, parent, (HMENU)ID_COMBOBOX, NULL, NULL); + ok(combo != 0, "Failed to create combobox window\n"); + UpdateWindow(combo); + + cbInfo.cbSize = sizeof(COMBOBOXINFO); + SetLastError(0xdeadbeef); + res = GetComboBoxInfo(combo, &cbInfo); + ok(res, "Failed to get COMBOBOXINFO structure; LastError: %u\n", GetLastError()); + + SendMessageA(cbInfo.hwndItem, EM_SETREADONLY, (WPARAM)TRUE, 0); + + flush_sequence(); + UpdateWindow(combo); + ok_sequence(WMEditReadonlyComboBoxSeq, "Setting edit control readonly.", FALSE); + + DestroyWindow(combo); + DestroyWindow(parent); }
/****************** WM_IME_KEYDOWN message test *******************/ -- 2.23.0