From: Elizabeth Figura zfigura@codeweavers.com
--- dlls/user32/tests/msg.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 9282896262e..92b52b39d03 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -1922,6 +1922,38 @@ static const struct message WmModalDialogSeq_2[] = { { WM_NCDESTROY, sent }, { 0 } }; +static const struct message create_visible_dialog_seq[] = +{ + { HCBT_CREATEWND, hook }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, + { WM_SETFONT, sent }, + { WM_INITDIALOG, sent }, + { WM_CHANGEUISTATE, sent|optional }, + { WM_SHOWWINDOW, sent|wparam, 1 }, + { HCBT_ACTIVATE, hook }, + { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOMOVE }, + { WM_ACTIVATEAPP, sent|wparam, 1 }, + { WM_NCACTIVATE, sent|wparam, 0 }, + { WM_ACTIVATE, sent|wparam, 1 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { WM_SETFOCUS, sent }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, + { WM_NCPAINT, sent|wparam, 1 }, + { WM_ERASEBKGND, sent }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, + /* the following 6 messages only appear before windows 8 */ + { WM_NCCALCSIZE, sent|wparam|optional, 0 }, + { WM_NCPAINT, sent|wparam|optional, 1 }, + { WM_ERASEBKGND, sent|optional }, + { WM_MOVE, sent|optional }, + { WM_SIZE, sent|wparam|optional, SIZE_RESTORED }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { WM_PAINT, sent }, + { WM_CTLCOLORBTN, sent }, + { 0 } +}; /* SetMenu for NonVisible windows with size change*/ static const struct message WmSetMenuNonVisibleSizeChangeSeq[] = { { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, @@ -16195,6 +16227,13 @@ static void test_dialog_messages(void) DestroyWindow(child); DestroyWindow(parent); flush_sequence(); + + hdlg = CreateDialogParamA(0, "TEST_DIALOG", 0, test_dlg_proc, 0); + ok(IsWindow(hdlg), "CreateDialogParam failed\n"); + ok_sequence(create_visible_dialog_seq, "create visible dialog", TRUE); + EndDialog(hdlg, 0); + DestroyWindow(hdlg); + flush_sequence(); }
static void test_enddialog_seq(HWND dialog, HWND owner)