Dmitry Timoshkov wrote: > Hello, > > Changelog: > user32: Make message test pass cleanly under XP SP2. > > --- > dlls/user32/tests/msg.c | 142 +++++++++++++++++++++++++++++++++------------- > 1 files changed, 102 insertions(+), 40 deletions(-) > > > > @@ -224,51 +226,53 @@ static const struct message WmSwitchChild[] = { > /* Switch MDI child */ > { WM_MDIACTIVATE, sent },/* in the MDI client */ > { WM_WINDOWPOSCHANGING, sent|wparam,SWP_NOSIZE|SWP_NOMOVE },/* in the > 1st MDI child */ > + { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, > { WM_CHILDACTIVATE, sent },/* in the 1st MDI child */ > /* Deactivate 2nd MDI child */ > - { WM_NCACTIVATE, sent|defwinproc|optional },/* in the 2nd MDI child */ > - { WM_MDIACTIVATE, sent|defwinproc|optional },/* in the 2nd MDI child */ > - { WM_CREATE, hook }, > + { WM_NCACTIVATE, sent|wparam|defwinproc, 0 }, /* in the 2nd MDI child */ > + { WM_MDIACTIVATE, sent|defwinproc }, /* in the 2nd MDI child */ > + { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, > /* Preparing for maximize and maximaze the 1st MDI child */ > - { WM_GETMINMAXINFO, sent|defwinproc|optional },/* in the 1st MDI child */ > - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc|optional, > SWP_FRAMECHANGED|SWP_STATECHANGED },/* in the 1st MDI child */ > - { WM_GETMINMAXINFO, sent|defwinproc|optional },/* in the 1st MDI child */ > - { WM_NCCALCSIZE, sent|wparam|defwinproc|optional, 1 },/* in the 1st MDI > child */ > - { WM_CHILDACTIVATE, sent|defwinproc|optional },/* in the 1st MDI child */ > - { WM_WINDOWPOSCHANGED, sent|defwinproc|optional },/* in the 1st MDI > child */ > - { WM_MOVE, sent|defwinproc|optional },/* in the 1st MDI child */ > - { WM_SIZE, sent|defwinproc|optional },/* in the 1st MDI child */ > + { WM_GETMINMAXINFO, sent|defwinproc }, /* in the 1st MDI child */ > + { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, > SWP_FRAMECHANGED|SWP_STATECHANGED }, /* in the 1st MDI child */ > + { WM_NCCALCSIZE, sent|wparam|defwinproc, 1 }, /* in the 1st MDI child */ > + { WM_CHILDACTIVATE, sent|defwinproc }, /* in the 1st MDI child */ > + { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, > SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 > }, /* in the 1st MDI child */ > + { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, /* in the 1st MDI > child */ > /* Lock redraw 2nd MDI child */ > - { WM_SETREDRAW, sent|defwinproc|optional },/* in the 2nd MDI child */ > - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc|optional, > SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE },/* in the 2nd MDI > child */ > - { WM_NCCALCSIZE, sent|wparam|defwinproc|optional, 1 },/* in the 2nd MDI > child */ > - { WM_WINDOWPOSCHANGED, sent|defwinproc|optional },/* in the 2nd MDI > child */ > - { WM_CREATE, hook }, > + { WM_SETREDRAW, sent|wparam|defwinproc, 0 }, /* in the 2nd MDI child */ > + { HCBT_MINMAX, hook|lparam, 0, SW_NORMALNA }, > /* Restore 2nd MDI child */ > - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc|optional, > SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_STATECHANGED },/* in the > 2nd MDI child */ > - { WM_GETMINMAXINFO, sent|defwinproc|optional },/* in the 2nd MDI child */ > - { WM_NCCALCSIZE, sent|wparam|defwinproc|optional, 1 },/* in the 2nd MDI > child */ > - { WM_WINDOWPOSCHANGED, sent|defwinproc|optional },/* in the 2nd MDI > child */ > - { WM_MOVE, sent|defwinproc|optional },/* in the 2nd MDI child */ > - { WM_SIZE, sent|defwinproc|optional },/* in the 2nd MDI child */ > + { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, > SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|0x8000 },/* in the 2nd MDI > child */ > + { WM_NCCALCSIZE, sent|wparam|defwinproc, 1 },/* in the 2nd MDI child */ > + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, /* in the 2nd > MDI child */ > + { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, > SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 > }, /* in the 2nd MDI child */ > + { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, /* in the 2nd MDI > child */ > + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* > in the 2nd MDI child */ > /* Redraw 2nd MDI child */ > - { WM_SETREDRAW, sent|defwinproc|optional },/* in the 2nd MDI child */ > - { WM_WINDOWPOSCHANGING, sent|wparam, > SWP_NOACTIVATE|SWP_NOSIZE|SWP_FRAMECHANGED|SWP_NOMOVE },/* in the MDI frame */ > - { WM_NCCALCSIZE, sent|wparam, 1 },/* in the MDI frame */ > - { WM_WINDOWPOSCHANGED, sent},/* in the MDI frame */ > - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc|optional, > SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE },/* in the 1st MDI child */ > - { WM_NCACTIVATE, sent|wparam|defwinproc|optional, 1 },/* in the 1st MDI > child */ > - { WM_SETVISIBLE, hook }, > - { WM_KILLFOCUS, sent|defwinproc|optional }, /* in the 2nd MDI child */ > - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ > - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, > + { WM_SETREDRAW, sent|wparam|defwinproc, 1 },/* in the 2nd MDI child */ > + /* Redraw MDI frame */ > + { WM_WINDOWPOSCHANGING, sent|wparam, > SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE },/* in MDI frame */ > + { WM_NCCALCSIZE, sent|wparam, 1 },/* in MDI frame */ > + { WM_WINDOWPOSCHANGED, sent|wparam, > SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE}, > /* in MDI frame */ > + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* > in MDI frame */ > + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* > in the 1st MDI child */ > + { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, > SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, /* in the 1st MDI child */ > + { WM_NCACTIVATE, sent|wparam|defwinproc, 1 }, /* in the 1st MDI child */ > + { HCBT_SETFOCUS, hook }, > + { WM_KILLFOCUS, sent|defwinproc }, /* in the 2nd MDI child */ > + { WM_IME_SETCONTEXT, sent|wparam|defwinproc, 0 },/* in the 1st MDI child > */ > + { WM_IME_SETCONTEXT, sent|wparam, 1 }, /* in MDI client */ > { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, > { WM_SETFOCUS, sent },/* in the MDI client */ > - { WM_SETVISIBLE, hook }, > + { HCBT_SETFOCUS, hook }, > { WM_KILLFOCUS, sent },/* in the MDI client */ > - { WM_SETFOCUS, sent|defwinproc|optional },/* in the 1st MDI child */ > - { WM_MDIACTIVATE, sent|defwinproc|optional },/* in the 1st MDI child */ > - { WM_WINDOWPOSCHANGED, sent },/* in the 1st MDI child */ > + { WM_IME_SETCONTEXT, sent|wparam, 0 }, /* in MDI client */ > + { WM_IME_SETCONTEXT, sent|wparam|defwinproc, 1 }, /* in the 1st MDI > child */ > + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, > + { WM_SETFOCUS, sent|defwinproc }, /* in the 1st MDI child */ > + { WM_MDIACTIVATE, sent|defwinproc },/* in the 1st MDI child */ > + { WM_WINDOWPOSCHANGED, sent|wparam, > SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, /* in the 1st MDI > child */ > { 0 } > }; > Sorry! It falls in my Windows XP SP2 with: msg.c:3267:expected 0009 - actual 0009 msg.c:3267:expected 0008 - actual 0008 msg.c:3267:expected 0281 - actual 0007 msg.c:3267: Test failed: Child did not switch correctly: the msg 0x0281 was expected, but got msg 0x0007 instead msg.c:3268:end of test for switch maximized MDI children
-- Best regards Anatoly Lyutin.