ReactOS  0.4.13-dev-259-g5ca9c9c
DeferWindowPos.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS API tests
3  * LICENSE: GPL - See COPYING in the top level directory
4  * PURPOSE: Test for DeferWindowPos function family
5  * PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org>
6  */
7 
8 #include "precomp.h"
9 
11 
12 /* FIXME: test for HWND_TOP, etc...*/
13 static int get_iwnd(HWND hWnd)
14 {
15  if(hWnd == hWnd1) return 1;
16  else if(hWnd == hWnd2) return 2;
17  else if(hWnd == hWnd3) return 3;
18  else if(hWnd == hWnd4) return 4;
19  else return 0;
20 }
21 
23 {
24  int iwnd = get_iwnd(hWnd);
25 
26  if(message > WM_USER || !iwnd || IsDWmMsg(message) || IseKeyMsg(message))
28 
29  switch(message)
30  {
31  case WM_IME_SETCONTEXT:
32  case WM_IME_NOTIFY :
33  case WM_GETICON :
34  case WM_GETTEXT:
35  break;
38  {
39  WINDOWPOS* pwp = (WINDOWPOS*)lParam;
40  ok(wParam==0,"expected wParam=0\n");
42  break;
43  }
44  default:
45  RECORD_MESSAGE(iwnd, message, SENT, 0,0);
46  }
48 }
49 
50 static void FlushMessages()
51 {
52  MSG msg;
53 
54  while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE ))
55  {
56  int iwnd = get_iwnd(msg.hwnd);
57  if(!(msg.message > WM_USER || !iwnd || IsDWmMsg(msg.message) || IseKeyMsg(msg.message)))
58  RECORD_MESSAGE(iwnd, msg.message, POST,0,0);
60  }
61 }
62 
63 /* unfortunately sometimes MSCTF windows get between the expected chain of windows
64  so just checking the next window does not work*/
66 {
67  HWND hWndNext;
68 
69  hWndNext=hWnd1;
70  while((hWndNext = GetWindow(hWndNext,GW_HWNDNEXT)))
71  {
72  if(hWndNext == hWnd2)
73  {
74  return TRUE;
75  }
76  }
77  return FALSE;
78 }
79 
80 #define EXPECT_NEXT(hWnd1, hWnd2) \
81  ok(IsNext(hWnd1, hWnd2), \
82  "After hwnd%d, expected hwnd%d not hwnd%d\n", \
83  get_iwnd(hWnd1), get_iwnd(hWnd2),get_iwnd(GetWindow(hWnd1,GW_HWNDNEXT)) )
84 
85 #define EXPECT_CHAIN(A,B,C,D) \
86  EXPECT_NEXT(hWnd##A, hWnd##B); \
87  EXPECT_NEXT(hWnd##B, hWnd##C); \
88  EXPECT_NEXT(hWnd##C, hWnd##D);
89 
90 #define ok_windowpos(hwnd, x, y, w, h, wnd) do { RECT rt; GetWindowRect(hwnd, &rt); \
91  ok(rt.left == (x) && rt.top == (y) && rt.right == (x)+(w) && rt.bottom == (y)+(h), \
92  "Unexpected %s position: (%ld, %ld) - (%ld, %ld)\n", wnd, rt.left, rt.top, rt.right, rt.bottom); } while (0)
93 
94 #define ok_lasterr(err, s) ok(GetLastError() == (err), "%s error = %lu\n", s, GetLastError())
95 
96 static void set_default_pos()
97 {
103  FlushMessages();
104  EMPTY_CACHE();
105 }
106 
108 {
109  HDWP hDwp;
110  BOOL ret;
111 
112  ok_windowpos(hWnd1, 10, 20, 200, 210, "Window 1");
113  ok_windowpos(hWnd2, 30, 40, 220, 230, "Window 2");
114 
115  /* close invalid handles */
118  ok(ret == 0, "EndDeferWindowPos succeeded with invalid handle\n");
119  ok_lasterr(ERROR_INVALID_DWP_HANDLE, "EndDeferWindowPos");
120 
122  ret = EndDeferWindowPos((HDWP)-1);
123  ok(ret == 0, "EndDeferWindowPos succeeded with invalid handle\n");
124  ok_lasterr(ERROR_INVALID_DWP_HANDLE, "EndDeferWindowPos");
125 
126  /* negative window count */
128  hDwp = BeginDeferWindowPos(-1);
129  ok(hDwp == NULL, "BeginDeferWindowPos failed\n");
130  ok_lasterr(ERROR_INVALID_PARAMETER, "BeginDeferWindowPos");
131 
132  /* zero windows */
134  hDwp = BeginDeferWindowPos(0);
135  ok(hDwp != NULL, "BeginDeferWindowPos failed\n");
136  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "BeginDeferWindowPos");
137  ret = EndDeferWindowPos(hDwp);
138  ok(ret != 0, "EndDeferWindowPos failed\n");
139  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "EndDeferWindowPos");
140 
141  /* more windows than expected */
143  hDwp = BeginDeferWindowPos(0);
144  ok(hDwp != NULL, "BeginDeferWindowPos failed\n");
145  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "BeginDeferWindowPos");
146  hDwp = DeferWindowPos(hDwp, hWnd, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
147  ok(hDwp != NULL, "DeferWindowPos failed\n");
148  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos");
149  ret = EndDeferWindowPos(hDwp);
150  ok(ret != 0, "EndDeferWindowPos failed\n");
151  ok(GetLastError() == ERROR_SUCCESS /* win7 sp1/x64 */
152  || GetLastError() == ERROR_INVALID_WINDOW_HANDLE /* 2k3 sp1/x86 */,
153  "EndDeferWindowPos error = %lu\n", GetLastError());
154  ok_windowpos(hWnd, 10, 20, 200, 210, "Window 1");
155 
156  /* more windows than expected 2 */
158  hDwp = BeginDeferWindowPos(1);
159  ok(hDwp != NULL, "BeginDeferWindowPos failed\n");
160  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "BeginDeferWindowPos");
161  hDwp = DeferWindowPos(hDwp, hWnd, NULL, 30, 20, 190, 195, SWP_NOZORDER);
162  ok(hDwp != NULL, "DeferWindowPos failed\n");
163  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos");
164  hDwp = DeferWindowPos(hDwp, hWnd2, NULL, 20, 30, 195, 190, SWP_NOZORDER);
165  ok(hDwp != NULL, "DeferWindowPos failed\n");
166  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos");
167  ret = EndDeferWindowPos(hDwp);
168  ok(ret != 0, "EndDeferWindowPos failed\n");
169  ok_lasterr(ERROR_SUCCESS, "EndDeferWindowPos");
170  ok_windowpos(hWnd, 30, 20, 190, 195, "Window 1");
171  ok_windowpos(hWnd2, 20, 30, 195, 190, "Window 2");
172 
173  /* fewer windows than expected */
174  MoveWindow(hWnd, 10, 20, 200, 210, FALSE);
176  hDwp = BeginDeferWindowPos(2);
177  ok(hDwp != NULL, "BeginDeferWindowPos failed\n");
178  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "BeginDeferWindowPos");
179  hDwp = DeferWindowPos(hDwp, hWnd, NULL, 20, 10, 210, 200, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
180  ok(hDwp != NULL, "DeferWindowPos failed\n");
181  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos");
182  ret = EndDeferWindowPos(hDwp);
183  ok(ret != 0, "EndDeferWindowPos failed\n");
184  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "EndDeferWindowPos");
185  ok_windowpos(hWnd, 10, 20, 200, 210, "Window 1");
186 
187  /* no operation, 1 window */
189  hDwp = BeginDeferWindowPos(1);
190  ok(hDwp != NULL, "BeginDeferWindowPos failed\n");
191  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "BeginDeferWindowPos");
192  hDwp = DeferWindowPos(hDwp, hWnd, NULL, 20, 10, 210, 200, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
193  ok(hDwp != NULL, "DeferWindowPos failed\n");
194  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos");
195  ret = EndDeferWindowPos(hDwp);
196  ok(ret != 0, "EndDeferWindowPos failed\n");
197  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "EndDeferWindowPos");
198  ok_windowpos(hWnd, 10, 20, 200, 210, "Window 1");
199 
200  /* same window twice */
202  hDwp = BeginDeferWindowPos(2);
203  ok(hDwp != NULL, "BeginDeferWindowPos failed\n");
204  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "BeginDeferWindowPos");
205  hDwp = DeferWindowPos(hDwp, hWnd, NULL, 80, 90, 220, 210, SWP_NOZORDER);
206  ok(hDwp != NULL, "DeferWindowPos failed\n");
207  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos");
208  hDwp = DeferWindowPos(hDwp, hWnd, NULL, 100, 110, 230, 250, SWP_NOZORDER);
209  ok(hDwp != NULL, "DeferWindowPos failed\n");
210  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos");
211  ret = EndDeferWindowPos(hDwp);
212  ok(ret != 0, "EndDeferWindowPos failed\n");
213  ok_lasterr(ERROR_SUCCESS, "EndDeferWindowPos");
214  ok_windowpos(hWnd, 100, 110, 230, 250, "Window 1");
215 
216  /* move & resize operation, 1 window */
218  hDwp = BeginDeferWindowPos(1);
219  ok(hDwp != NULL, "BeginDeferWindowPos failed\n");
220  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "BeginDeferWindowPos");
221  hDwp = DeferWindowPos(hDwp, hWnd, NULL, 20, 10, 210, 200, SWP_NOZORDER);
222  ok(hDwp != NULL, "DeferWindowPos failed\n");
223  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos");
224  ret = EndDeferWindowPos(hDwp);
225  ok(ret != 0, "EndDeferWindowPos failed\n");
226  ok_lasterr(ERROR_SUCCESS, "EndDeferWindowPos");
227  ok_windowpos(hWnd, 20, 10, 210, 200, "Window 1");
228 
229  /* move & resize operation, 2 windows */
231  hDwp = BeginDeferWindowPos(2);
232  ok(hDwp != NULL, "BeginDeferWindowPos failed\n");
233  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "BeginDeferWindowPos");
234  hDwp = DeferWindowPos(hDwp, hWnd, NULL, 50, 60, 230, 240, SWP_NOZORDER);
235  ok(hDwp != NULL, "DeferWindowPos failed\n");
236  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos");
237  hDwp = DeferWindowPos(hDwp, hWnd2, NULL, 70, 80, 250, 260, SWP_NOZORDER);
238  ok(hDwp != NULL, "DeferWindowPos failed\n");
239  ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos");
240  ret = EndDeferWindowPos(hDwp);
241  ok(ret != 0, "EndDeferWindowPos failed\n");
242  ok_lasterr(ERROR_SUCCESS, "EndDeferWindowPos");
243  ok_windowpos(hWnd, 50, 60, 230, 240, "Window 1");
244  ok_windowpos(hWnd2, 70, 80, 250, 260, "Window 2");
245 
246  FlushMessages();
247  EMPTY_CACHE();
248 }
249 
252  {1,WM_GETMINMAXINFO},
254  {1,WM_MOVE},
255  {0,0}};
256 
259  {1,WM_GETMINMAXINFO},
260  {1,WM_NCCALCSIZE},
262  {1,WM_SIZE},
263  {1,WM_NCCALCSIZE},
264  {0,0}};
265 
268  {1,WM_GETMINMAXINFO},
270  {2,WM_GETMINMAXINFO},
272  {1,WM_MOVE},
274  {2,WM_MOVE},
275  {0,0}};
276 
277 
281  {0,0}};
282 
288  {0,0}};
289 
291 {
292  HDWP hdwp;
293  BOOL ret;
294 
295  SetWindowPos(hWnd1, 0, 10,20,100,100,0);
296  SetWindowPos(hWnd2, 0, 10,20,100,100,0);
297  FlushMessages();
298  EMPTY_CACHE();
299 
300  /* move hWnd1 */
301  hdwp = BeginDeferWindowPos(1);
302  ok(hdwp != NULL, "BeginDeferWindowPos failed\n");
303  hdwp = DeferWindowPos(hdwp, hWnd1, HWND_TOP, 20, 30, 100, 100, SWP_NOACTIVATE|SWP_NOOWNERZORDER);
304  ok(hdwp != NULL, "DeferWindowPos failed\n");
305  FlushMessages();
307  ret = EndDeferWindowPos(hdwp);
308  ok(ret != 0, "EndDeferWindowPos failed\n");
309  FlushMessages();
311 
312  /* resize hWnd1 */
313  hdwp = BeginDeferWindowPos(1);
314  ok(hdwp != NULL, "BeginDeferWindowPos failed\n");
315  hdwp = DeferWindowPos(hdwp, hWnd1, HWND_TOP, 20, 30, 110, 110, SWP_NOACTIVATE|SWP_NOOWNERZORDER);
316  ok(hdwp != NULL, "DeferWindowPos failed\n");
317  FlushMessages();
319  ret = EndDeferWindowPos(hdwp);
320  ok(ret != 0, "EndDeferWindowPos failed\n");
321  FlushMessages();
323 
324  /* move both windows */
325  hdwp = BeginDeferWindowPos(1);
326  ok(hdwp != NULL, "BeginDeferWindowPos failed\n");
327  hdwp = DeferWindowPos(hdwp, hWnd1, HWND_TOP, 30, 40, 110, 110, SWP_NOACTIVATE|SWP_NOOWNERZORDER);
328  ok(hdwp != NULL, "DeferWindowPos failed\n");
329  hdwp = DeferWindowPos(hdwp, hWnd2, HWND_TOP, 30, 40, 100, 100, SWP_NOACTIVATE|SWP_NOOWNERZORDER);
330  ok(hdwp != NULL, "DeferWindowPos failed\n");
331  FlushMessages();
333  ret = EndDeferWindowPos(hdwp);
334  ok(ret != 0, "EndDeferWindowPos failed\n");
335  FlushMessages();
337 
338  /* change the z-order of the first window */
339  hdwp = BeginDeferWindowPos(1);
340  ok(hdwp != NULL, "BeginDeferWindowPos failed\n");
342  ok(hdwp != NULL, "DeferWindowPos failed\n");
343  FlushMessages();
345  ret = EndDeferWindowPos(hdwp);
346  ok(ret != 0, "EndDeferWindowPos failed\n");
347  FlushMessages();
349 
350  /* change the z-order of both windows */
351  hdwp = BeginDeferWindowPos(2);
352  ok(hdwp != NULL, "BeginDeferWindowPos failed\n");
354  ok(hdwp != NULL, "DeferWindowPos failed\n");
356  ok(hdwp != NULL, "DeferWindowPos failed\n");
357  FlushMessages();
359  ret = EndDeferWindowPos(hdwp);
360  ok(ret != 0, "EndDeferWindowPos failed\n");
361  FlushMessages();
363 
364 }
365 
366 #define OwnerZOrderAParams SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOSIZE
367 
372  {0,0}};
373 
377  {0,0}};
378 
386  {0,0}};
387 
392  {0,0}};
393 
399  {0,0}};
400 
401 #define OwnerZOrderBParams SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOOWNERZORDER
402 
406  {0,0}};
407 
411  {0,0}};
412 
416  {0,0}};
417 
421  {0,0}};
422 
426  {0,0}};
427 
428 static void Test_DWP_OwnerZOrder()
429 {
430  EXPECT_CHAIN(4,3,1,2);
431 
432  /* test how SetWindowPos can change the z order of owner windows */
433  /* note that SWP_NOACTIVATE must be used because otherwise
434  SetWindowPos will call SetWindowPos again with different parameters */
435  SetWindowPos(hWnd1, 0, 0,0,0,0, OwnerZOrderAParams);
436  FlushMessages();
438  EXPECT_CHAIN(4,3,1,2);
439 
440  SetWindowPos(hWnd2, 0, 0,0,0,0, OwnerZOrderAParams);
441  FlushMessages();
443  EXPECT_CHAIN(2,4,3,1);
444 
445  SetWindowPos(hWnd3, 0, 0,0,0,0, OwnerZOrderAParams);
446  FlushMessages();
448  EXPECT_CHAIN(3,4,1,2);
449 
450  SetWindowPos(hWnd1, 0, 0,0,0,0, OwnerZOrderAParams);
451  FlushMessages();
453  EXPECT_CHAIN(3,4,1,2);
454 
455  SetWindowPos(hWnd4, 0, 0,0,0,0, OwnerZOrderAParams);
456  FlushMessages();
458  EXPECT_CHAIN(4,3,1,2);
459 
460  /* now do the same thing one more time with SWP_NOOWNERZORDER */
461  /* SWP_NOACTIVATE is needed because without it SetActiveWindow
462  will be calledit and it will call SetWindowPos again
463  WITHOUT SWP_NOOWNERZORDER. that means that
464  in order for SWP_NOOWNERZORDER to have effect we have to use
465  SWP_NOACTIVATE as well */
466  set_default_pos();
467  EXPECT_CHAIN(4,3,2,1);
468 
469  SetWindowPos(hWnd1, 0, 0,0,0,0, OwnerZOrderBParams);
470  FlushMessages();
472  EXPECT_CHAIN(1,4,3,2);
473 
474  SetWindowPos(hWnd2, 0, 0,0,0,0, OwnerZOrderBParams);
475  FlushMessages();
477  EXPECT_CHAIN(2,1,4,3);
478 
479  SetWindowPos(hWnd3, 0, 0,0,0,0, OwnerZOrderBParams);
480  FlushMessages();
482  EXPECT_CHAIN(3,2,1,4);
483 
484  SetWindowPos(hWnd1, 0, 0,0,0,0, OwnerZOrderBParams);
485  FlushMessages();
487  EXPECT_CHAIN(1,3,2,4);
488 
489  SetWindowPos(hWnd4, 0, 0,0,0,0, OwnerZOrderBParams);
490  FlushMessages();
492  EXPECT_CHAIN(4,1,3,2);
493 
494 }
495 
497 {
498  SetCursorPos(0,0);
499 
500  RegisterSimpleClass(DWPTestProc, L"ownertest");
501  hWnd1 = CreateWindowExW(0, L"ownertest", L"abc", 0, 10, 20,
502  200, 210, NULL, NULL, 0, NULL);
503  hWnd2 = CreateWindowExW(0, L"ownertest", L"def", 0, 30, 40,
504  220, 230, NULL, NULL, 0, NULL);
505  hWnd3 = CreateWindowW(L"ownertest", L"ownertest", WS_OVERLAPPEDWINDOW,
506  20, 350, 300, 300, hWnd1, NULL, 0, NULL);
507  hWnd4 = CreateWindowW(L"ownertest", L"ownertest", WS_OVERLAPPEDWINDOW,
508  250, 250, 200, 200, hWnd1, NULL, 0, NULL);
509 
510  ok(hWnd1 != NULL, "CreateWindow failed\n");
511  ok(hWnd2 != NULL, "CreateWindow failed\n");
512  ok(hWnd3 != NULL, "CreateWindow failed\n");
513  ok(hWnd4 != NULL, "CreateWindow failed\n");
514 
515  set_default_pos();
517 
518  set_default_pos();
520 
521  set_default_pos();
523 
528  }
#define GW_HWNDNEXT
Definition: winuser.h:756
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
static int get_iwnd(HWND hWnd)
#define WM_IME_NOTIFY
Definition: winuser.h:1806
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
MSG_ENTRY OwnerZOrder5A_chain[]
Definition: tftpd.h:59
#define ERROR_INVALID_DWP_HANDLE
Definition: winerror.h:886
HDWP WINAPI BeginDeferWindowPos(_In_ int)
#define PeekMessage
Definition: winuser.h:5696
#define TRUE
Definition: types.h:120
#define ERROR_SUCCESS
Definition: deptool.c:10
Definition: msgtrace.h:14
MSG_ENTRY move1_2_chain[]
#define WM_NCCALCSIZE
Definition: winuser.h:1667
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
#define WM_GETTEXT
Definition: winuser.h:1600
MSG_ENTRY resize1_chain[]
MSG_ENTRY OwnerZOrder3B_chain[]
#define CALLBACK
Definition: compat.h:27
#define ok_windowpos(hwnd, x, y, w, h, wnd)
HWND hWnd
Definition: settings.c:17
HWND hwndInsertAfter
Definition: winuser.h:3531
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define WM_MOVE
Definition: winuser.h:1592
#define HWND_TOP
Definition: winuser.h:1193
UINT_PTR WPARAM
Definition: windef.h:207
#define SWP_NOZORDER
Definition: winuser.h:1232
BOOL WINAPI DestroyWindow(_In_ HWND)
static void Test_DWP_SimpleMsg(HWND hWnd1, HWND hWnd2)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4185
MSG_ENTRY OwnerZOrder4B_chain[]
WPARAM wParam
Definition: combotst.c:138
MSG_ENTRY OwnerZOrder2A_chain[]
HWND hWnd3
static BOOL IseKeyMsg(UINT msg)
Definition: msgtrace.h:52
static void Test_DWP_Error(HWND hWnd, HWND hWnd2)
HWND WINAPI SetActiveWindow(_In_ HWND)
unsigned int BOOL
Definition: ntddk_ex.h:94
#define ok_lasterr(err, s)
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
#define ok(value,...)
LRESULT CALLBACK DWPTestProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
UINT flags
Definition: winuser.h:3536
START_TEST(DeferWindowPos)
MSG_ENTRY OwnerZOrder2B_chain[]
MSG_ENTRY OwnerZOrder1B_chain[]
#define OwnerZOrderAParams
#define DefWindowProc
Definition: ros2win.h:31
static __inline ATOM RegisterSimpleClass(WNDPROC lpfnWndProc, LPCWSTR lpszClassName)
MSG_ENTRY ZOrder1and2_chain[]
static void FlushMessages()
#define HWND_BOTTOM
Definition: winuser.h:1191
#define ERROR_INVALID_WINDOW_HANDLE
Definition: winerror.h:881
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
MSG_ENTRY ZOrder1_chain[]
#define COMPARE_CACHE(msg_chain)
Definition: msgtrace.h:57
#define WM_SIZE
Definition: winuser.h:1593
#define EXPECT_CHAIN(A, B, C, D)
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define WM_IME_SETCONTEXT
Definition: winuser.h:1805
static void Test_DWP_OwnerZOrder()
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1643
BOOL WINAPI SetCursorPos(_In_ int, _In_ int)
Definition: cursoricon.c:2627
#define SetLastError(x)
Definition: compat.h:409
#define OwnerZOrderBParams
int ret
Definition: msgtrace.h:7
static BOOL IsNext(HWND hWnd1, HWND hWnd2)
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
static const WCHAR L[]
Definition: oid.c:1250
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
static void set_default_pos()
MSG_ENTRY OwnerZOrder1A_chain[]
#define EMPTY_CACHE()
Definition: msgtrace.h:59
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
#define DNS_ERROR_RCODE_NXRRSET
Definition: winerror.h:1855
#define WM_USER
Definition: winuser.h:1856
MSG_ENTRY OwnerZOrder3A_chain[]
#define SWP_NOSIZE
Definition: winuser.h:1230
static BOOL IsDWmMsg(UINT msg)
Definition: msgtrace.h:39
HWND hWnd1
unsigned int UINT
Definition: ndis.h:50
#define SWP_SHOWWINDOW
Definition: winuser.h:1233
Definition: msgtrace.h:6
HWND hWnd4
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1644
#define msg(x)
Definition: auth_time.c:54
#define RECORD_MESSAGE(...)
Definition: msgtrace.h:60
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define SWP_NOCLIENTMOVE
Definition: msg.h:30
#define SWP_NOMOVE
Definition: winuser.h:1229
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define PM_REMOVE
Definition: winuser.h:1182
MSG_ENTRY move1_chain[]
LONG_PTR LRESULT
Definition: windef.h:209
#define SWP_NOCLIENTSIZE
Definition: msg.h:29
MSG_ENTRY empty_chain[]
Definition: msgtrace.c:20
LPARAM lParam
Definition: combotst.c:139
#define WM_GETMINMAXINFO
Definition: winuser.h:1622
HWND hWnd2
MSG_ENTRY OwnerZOrder5B_chain[]
MSG_ENTRY OwnerZOrder4A_chain[]
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234