ReactOS  0.4.15-dev-1152-g6c94e4f
CreateWindowEx.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS API tests
3  * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory
4  * PURPOSE: Test for CreateWindowEx
5  * PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org>
6  * Mark Jansen (mark.jansen@reactos.org)
7  */
8 
9 #include "precomp.h"
10 
11 static void Test_Params(void)
12 {
13  HWND hWnd;
14  DWORD dwError;
15 
16  SetLastError(0x1234);
17  hWnd = CreateWindowExW(0, L"BUTTON", NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
18  dwError = GetLastError();
19  ok(hWnd != NULL, "hWnd = %p\n", hWnd);
20  ok(dwError == 0, "error = %lu\n", dwError);
22 
23  SetLastError(0x1234);
24  hWnd = CreateWindowExW(0, L"BUTTON", NULL, 0, 0, 0, 0, 0, (HWND)(LONG_PTR)-1, NULL, NULL, NULL);
25  dwError = GetLastError();
26  ok(hWnd == NULL, "hWnd = %p\n", hWnd);
27  ok(dwError == ERROR_INVALID_WINDOW_HANDLE, "error = %lu\n", dwError);
28 
29  SetLastError(0x1234);
30  hWnd = CreateWindowExW(0, L"BUTTON", NULL, WS_CHILD, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
31  dwError = GetLastError();
32  ok(hWnd == NULL, "hWnd = %p\n", hWnd);
33  ok(dwError == ERROR_TLW_WITH_WSCHILD, "error = %lu\n", dwError);
34 
35  SetLastError(0x1234);
36  hWnd = CreateWindowExW(0, L"BUTTON", NULL, WS_CHILD, 0, 0, 0, 0, (HWND)(LONG_PTR)-1, NULL, NULL, NULL);
37  dwError = GetLastError();
38  ok(hWnd == NULL, "hWnd = %p\n", hWnd);
39  ok(dwError == ERROR_INVALID_WINDOW_HANDLE, "error = %lu\n", dwError);
40 
41  SetLastError(0x1234);
42  hWnd = CreateWindowExW(0, L"BUTTON", NULL, WS_POPUP, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
43  dwError = GetLastError();
44  ok(hWnd != NULL, "hWnd = %p\n", hWnd);
45  ok(dwError == 0, "error = %lu\n", dwError);
47 
48  SetLastError(0x1234);
49  hWnd = CreateWindowExW(0, L"BUTTON", NULL, WS_POPUP, 0, 0, 0, 0, (HWND)(LONG_PTR)-1, NULL, NULL, NULL);
50  dwError = GetLastError();
51  ok(hWnd == NULL, "hWnd = %p\n", hWnd);
52  ok(dwError == ERROR_INVALID_WINDOW_HANDLE, "error = %lu\n", dwError);
53 
54  SetLastError(0x1234);
55  hWnd = CreateWindowExW(0, L"BUTTON", NULL, WS_CHILD|WS_POPUP, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
56  dwError = GetLastError();
57  ok(hWnd != NULL, "hWnd = %p\n", hWnd);
58  ok(dwError == 0, "error = %lu\n", dwError);
60 
61  SetLastError(0x1234);
62  hWnd = CreateWindowExW(0, L"BUTTON", NULL, WS_CHILD|WS_POPUP, 0, 0, 0, 0, (HWND)(LONG_PTR)-1, NULL, NULL, NULL);
63  dwError = GetLastError();
64  ok(hWnd == NULL, "hWnd = %p\n", hWnd);
65  ok(dwError == ERROR_INVALID_WINDOW_HANDLE, "error = %lu\n", dwError);
66 }
67 
71 
72 static int get_iwnd(HWND hWnd)
73 {
74  if (!g_TestWindow)
76  if (!g_ChildWindow && hWnd != g_TestWindow)
78 
79  if (hWnd == g_TestWindow)
80  return 1;
81  else if (hWnd == g_ChildWindow)
82  return 2;
83  return 0;
84 }
85 
91 
96 
97 #undef ok_hex_
98 #define ok_hex_(expression, result) \
99  do { \
100  int _value = (expression); \
101  ok_(__FILE__, g_FaultLine)(_value == (result), "Wrong value for '%s', expected: " #result " (0x%x), got: 0x%x\n", \
102  #expression, (int)(result), _value); \
103  } while (0)
104 
105 
106 
107 static int g_ChangeStyle = 0;
109 {
110  LRESULT lRet;
111  int iwnd = get_iwnd(hWnd);
112 
113  if(message > WM_USER || !iwnd || IsDWmMsg(message) || IseKeyMsg(message))
115 
116  switch(message)
117  {
118  case WM_IME_SETCONTEXT:
119  case WM_IME_NOTIFY:
120  case WM_GETICON:
121  case WM_GETTEXT:
123  break;
124  case WM_NCCREATE:
125  {
127  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
128  ok_hex_(create->style, g_NcExpectStyle);
129  ok_hex_(create->dwExStyle, g_NcExpectExStyle);
130  if (g_ChangeStyle)
131  {
132  DWORD dwStyle = GetWindowLong(hWnd, GWL_EXSTYLE);
133  dwStyle &= ~(WS_EX_CLIENTEDGE);
134  SetWindowLong(hWnd, GWL_EXSTYLE, dwStyle);
135  RECORD_MESSAGE(iwnd, message, MARKER, 0, 0);
136  SetWindowPos(hWnd, NULL, 0, 0, 0, 0,
138 
139  RECORD_MESSAGE(iwnd, message, MARKER, 0, 0);
140  ok_hex_(create->style, g_NcExpectStyle);
141  ok_hex_(create->dwExStyle, g_NcExpectExStyle);
142  }
143  }
144  break;
145  case WM_CREATE:
146  {
148  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
149  ok_hex_(create->style, g_ExpectStyle);
150  ok_hex_(create->dwExStyle, g_ExpectExStyle);
151  }
152  break;
153  case WM_NCCALCSIZE:
154  case WM_STYLECHANGING:
155  case WM_STYLECHANGED:
156  case WM_SIZE:
157  RECORD_MESSAGE(iwnd, message, SENT, wParam, 0);
158  break;
160  case WM_WINDOWPOSCHANGED:
161  ok(wParam == 0,"expected wParam=0\n");
162  RECORD_MESSAGE(iwnd, message, SENT, ((WINDOWPOS*)lParam)->flags, 0);
163  break;
164  default:
165  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
166  break;
167  }
169  RECORD_MESSAGE(iwnd, message, SENT_RET, 0, 0);
170  return lRet;
171 }
172 
174 {
175  { 1, WM_GETMINMAXINFO, SENT },
176  { 1, WM_GETMINMAXINFO, SENT_RET },
177  { 1, WM_NCCREATE, SENT },
178  { 1, WM_NCCREATE, SENT_RET },
179  { 1, WM_NCCALCSIZE, SENT },
180  { 1, WM_NCCALCSIZE, SENT_RET },
181  { 1, WM_CREATE, SENT },
182  { 1, WM_CREATE, SENT_RET },
183  { 0, 0 }
184 };
185 
187 {
188  { 1, WM_GETMINMAXINFO, SENT },
189  { 1, WM_GETMINMAXINFO, SENT_RET },
190  { 1, WM_NCCREATE, SENT },
191  { 1, WM_STYLECHANGING, SENT, GWL_EXSTYLE },
192  { 1, WM_STYLECHANGING, SENT_RET },
193  { 1, WM_STYLECHANGED, SENT, GWL_EXSTYLE },
194  { 1, WM_STYLECHANGED, SENT_RET },
195  { 1, WM_NCCREATE, MARKER },
198  { 1, WM_NCCALCSIZE, SENT, TRUE },
199  { 1, WM_NCCALCSIZE, SENT_RET },
201  { 1, WM_MOVE, SENT },
202  { 1, WM_MOVE, SENT_RET },
203  { 1, WM_SIZE, SENT },
204  { 1, WM_SIZE, SENT_RET },
206  { 1, WM_NCCREATE, MARKER },
207  { 1, WM_NCCREATE, SENT_RET },
208  { 1, WM_NCCALCSIZE, SENT },
209  { 1, WM_NCCALCSIZE, SENT_RET },
210  { 1, WM_CREATE, SENT },
211  { 1, WM_CREATE, SENT_RET },
212  { 0, 0 }
213 };
214 
216 {
217  { 1, WM_GETMINMAXINFO, SENT },
218  { 1, WM_GETMINMAXINFO, SENT_RET },
219  { 1, WM_NCCREATE, SENT },
220  { 1, WM_STYLECHANGING, SENT, GWL_EXSTYLE },
221  { 1, WM_STYLECHANGING, SENT_RET },
222  { 1, WM_STYLECHANGED, SENT, GWL_EXSTYLE },
223  { 1, WM_STYLECHANGED, SENT_RET },
224  { 1, WM_NCCREATE, MARKER },
227  { 1, WM_NCCALCSIZE, SENT, TRUE },
228  { 1, WM_NCCALCSIZE, SENT_RET },
230  { 1, WM_MOVE, SENT },
231  { 1, WM_MOVE, SENT_RET },
232  { 1, WM_SIZE, SENT },
233  { 1, WM_SIZE, SENT_RET },
235  { 1, WM_NCCALCSIZE, SENT, TRUE },
236  { 1, WM_NCCALCSIZE, SENT_RET },
237  { 1, WM_NCCREATE, MARKER },
238  { 1, WM_NCCREATE, SENT_RET },
239  { 1, WM_NCCALCSIZE, SENT },
240  { 1, WM_NCCALCSIZE, SENT_RET },
241  { 1, WM_CREATE, SENT },
242  { 1, WM_CREATE, SENT_RET },
243  { 0, 0 }
244 };
245 
246 
247 static BOOL
249 {
250  OSVERSIONINFOEXW osvi = { sizeof(osvi), 0, 0, 0, 0, {0}, 0, 0, 0, VER_NT_WORKSTATION };
251  DWORDLONG const dwlConditionMask = VerSetConditionMask( 0, VER_PRODUCT_TYPE, VER_EQUAL );
252 
253  return !VerifyVersionInfoW(&osvi, VER_PRODUCT_TYPE, dwlConditionMask);
254 }
255 
256 
257 static BOOL
259 {
260  OSVERSIONINFOEXW osvi = { sizeof(osvi), 0, 0, 0, 0, {0}, 0, 0 };
261  DWORDLONG const dwlConditionMask = VerSetConditionMask(VerSetConditionMask(
265 
268 
270 }
271 
272 static void Test_Messages(void)
273 {
274  HWND hWnd;
275  BOOL Below8NonServer = !IsWindows8OrGreater() && !IsWindowsServer();
276 
277  RegisterSimpleClass(MSGTestProc, L"Test_Message_Window_XX");
278 
279  g_ChangeStyle = 0;
280 
283  g_FaultLine = __LINE__ + 1;
284  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_XX", L"", 0, 10, 20,
285  200, 210, NULL, NULL, 0, NULL);
286 
287  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
291  EMPTY_CACHE();
292 
295  g_FaultLine = __LINE__ + 1;
296  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_XX", L"", WS_OVERLAPPEDWINDOW, 10, 20,
297  200, 210, NULL, NULL, 0, NULL);
298 
299  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
303  EMPTY_CACHE();
304 
305  g_ChangeStyle = 1;
306 
309  g_FaultLine = __LINE__ + 1;
310  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_XX", L"", 0, 10, 20,
311  200, 210, NULL, NULL, 0, NULL);
312 
313  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
317  EMPTY_CACHE();
318 
321  g_FaultLine = __LINE__ + 1;
322  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_XX", L"", WS_OVERLAPPEDWINDOW, 10, 20,
323  200, 210, NULL, NULL, 0, NULL);
324 
325  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
329  EMPTY_CACHE();
330 
331  UnregisterClassW(L"Test_Message_Window_XX", NULL);
332 }
333 
334 
336 {
337  LRESULT lRet;
338  int iwnd = get_iwnd(hWnd);
339 
340  if(message > WM_USER || !iwnd || IsDWmMsg(message) || IseKeyMsg(message))
342 
343  switch(message)
344  {
345  case WM_IME_SETCONTEXT:
346  case WM_IME_NOTIFY:
347  case WM_GETICON:
348  case WM_GETTEXT:
350  break;
351  case WM_NCCREATE:
352  {
354  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
357 
358  if (g_ChangeStyle)
359  {
361  dwStyle &= ~(WS_EX_CLIENTEDGE);
363  RECORD_MESSAGE(iwnd, message, MARKER, 0, 0);
364  SetWindowPos(g_TestWindow, NULL, 0, 0, 0, 0,
366 
367  RECORD_MESSAGE(iwnd, message, MARKER, 0, 0);
370  }
371  }
372  break;
373  case WM_CREATE:
374  {
376  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
378  ok_hex_(create->dwExStyle, g_ChildExpectExStyle);
379  }
380  break;
381  case WM_NCCALCSIZE:
382  case WM_STYLECHANGING:
383  case WM_STYLECHANGED:
384  case WM_SIZE:
385  RECORD_MESSAGE(iwnd, message, SENT, wParam, 0);
386  break;
388  case WM_WINDOWPOSCHANGED:
389  ok(wParam == 0,"expected wParam=0\n");
390  RECORD_MESSAGE(iwnd, message, SENT, ((WINDOWPOS*)lParam)->flags, 0);
391  break;
392  default:
393  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
394  break;
395  }
397  RECORD_MESSAGE(iwnd, message, SENT_RET, 0, 0);
398  return lRet;
399 }
400 
401 
403 {
404  LRESULT lRet;
405  int iwnd = get_iwnd(hWnd);
406 
407  if(message > WM_USER || !iwnd || IsDWmMsg(message) || IseKeyMsg(message))
409 
410  switch(message)
411  {
412  case WM_IME_SETCONTEXT:
413  case WM_IME_NOTIFY:
414  case WM_GETICON:
415  case WM_GETTEXT:
417  break;
418  case WM_NCCREATE:
419  {
420  HWND child;
422  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
423  ok_hex_(create->style, g_NcExpectStyle);
424  ok_hex_(create->dwExStyle, g_NcExpectExStyle);
425 
426  child = CreateWindowExW(0, L"Test_Message_Window_Child2", L"", WS_CHILD, 0, 0, 10, 10, hWnd, NULL, 0, NULL);
427  RECORD_MESSAGE(iwnd, message, MARKER, 0, 0);
428  ok_(__FILE__, g_FaultLine)(g_ChildWindow == child, "Testing against the wrong child!\n");
429  }
430  break;
431  case WM_NCDESTROY:
432  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
434  break;
435  case WM_CREATE:
436  {
438  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
439  ok_hex_(create->style, g_ExpectStyle);
440  ok_hex_(create->dwExStyle, g_ExpectExStyle);
441  }
442  break;
443  case WM_NCCALCSIZE:
444  case WM_STYLECHANGING:
445  case WM_STYLECHANGED:
446  case WM_SIZE:
447  RECORD_MESSAGE(iwnd, message, SENT, wParam, 0);
448  break;
450  case WM_WINDOWPOSCHANGED:
451  ok(wParam == 0,"expected wParam=0\n");
452  RECORD_MESSAGE(iwnd, message, SENT, ((WINDOWPOS*)lParam)->flags, 0);
453  break;
454  default:
455  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
456  break;
457  }
459  RECORD_MESSAGE(iwnd, message, SENT_RET, 0, 0);
460  return lRet;
461 }
462 
463 
465 {
466  { 1, WM_GETMINMAXINFO, SENT },
467  { 1, WM_GETMINMAXINFO, SENT_RET },
468  { 1, WM_NCCREATE, SENT },
469  { 2, WM_NCCREATE, SENT },
470  { 2, WM_NCCREATE, SENT_RET },
471  { 2, WM_NCCALCSIZE, SENT },
472  { 2, WM_NCCALCSIZE, SENT_RET },
473  { 2, WM_CREATE, SENT },
474  { 2, WM_CREATE, SENT_RET },
475  { 2, WM_SIZE, SENT },
476  { 2, WM_SIZE, SENT_RET },
477  { 2, WM_MOVE, SENT },
478  { 2, WM_MOVE, SENT_RET },
479  { 1, WM_PARENTNOTIFY, SENT },
480  { 1, WM_PARENTNOTIFY, SENT_RET },
481  { 1, WM_NCCREATE, MARKER },
482  { 1, WM_NCCREATE, SENT_RET },
483  { 1, WM_NCCALCSIZE, SENT },
484  { 1, WM_NCCALCSIZE, SENT_RET },
485  { 1, WM_CREATE, SENT },
486  { 1, WM_CREATE, SENT_RET },
487  { 0, 0 }
488 };
489 
491 {
492  { 1, WM_GETMINMAXINFO, SENT },
493  { 1, WM_GETMINMAXINFO, SENT_RET },
494  { 1, WM_NCCREATE, SENT },
495  { 2, WM_NCCREATE, SENT },
496  { 1, WM_STYLECHANGING, SENT, GWL_EXSTYLE },
497  { 1, WM_STYLECHANGING, SENT_RET },
498  { 1, WM_STYLECHANGED, SENT, GWL_EXSTYLE },
499  { 1, WM_STYLECHANGED, SENT_RET },
500  { 2, WM_NCCREATE, MARKER },
503  { 1, WM_NCCALCSIZE, SENT, TRUE },
504  { 1, WM_NCCALCSIZE, SENT_RET },
506  { 1, WM_MOVE, SENT },
507  { 1, WM_MOVE, SENT_RET },
508  { 1, WM_SIZE, SENT },
509  { 1, WM_SIZE, SENT_RET },
511  { 2, WM_NCCREATE, MARKER },
512  { 2, WM_NCCREATE, SENT_RET },
513  { 2, WM_NCCALCSIZE, SENT },
514  { 2, WM_NCCALCSIZE, SENT_RET },
515  { 2, WM_CREATE, SENT },
516  { 2, WM_CREATE, SENT_RET },
517  { 2, WM_SIZE, SENT },
518  { 2, WM_SIZE, SENT_RET },
519  { 2, WM_MOVE, SENT },
520  { 2, WM_MOVE, SENT_RET },
521  { 1, WM_PARENTNOTIFY, SENT },
522  { 1, WM_PARENTNOTIFY, SENT_RET },
523  { 1, WM_NCCREATE, MARKER },
524  { 1, WM_NCCREATE, SENT_RET },
525  { 1, WM_NCCALCSIZE, SENT },
526  { 1, WM_NCCALCSIZE, SENT_RET },
527  { 1, WM_CREATE, SENT },
528  { 1, WM_CREATE, SENT_RET },
529  { 0, 0 }
530 };
531 
533 {
534  { 1, WM_GETMINMAXINFO, SENT },
535  { 1, WM_GETMINMAXINFO, SENT_RET },
536  { 1, WM_NCCREATE, SENT },
537  { 2, WM_NCCREATE, SENT },
538  { 1, WM_STYLECHANGING, SENT, GWL_EXSTYLE },
539  { 1, WM_STYLECHANGING, SENT_RET },
540  { 1, WM_STYLECHANGED, SENT, GWL_EXSTYLE },
541  { 1, WM_STYLECHANGED, SENT_RET },
542  { 2, WM_NCCREATE, MARKER },
545  { 1, WM_NCCALCSIZE, SENT, TRUE },
546  { 1, WM_NCCALCSIZE, SENT_RET },
548  { 1, WM_MOVE, SENT },
549  { 1, WM_MOVE, SENT_RET },
550  { 1, WM_SIZE, SENT },
551  { 1, WM_SIZE, SENT_RET },
553  { 1, WM_NCCALCSIZE, SENT, TRUE },
554  { 1, WM_NCCALCSIZE, SENT_RET },
555  { 2, WM_NCCREATE, MARKER },
556  { 2, WM_NCCREATE, SENT_RET },
557  { 2, WM_NCCALCSIZE, SENT },
558  { 2, WM_NCCALCSIZE, SENT_RET },
559  { 2, WM_CREATE, SENT },
560  { 2, WM_CREATE, SENT_RET },
561  { 2, WM_SIZE, SENT },
562  { 2, WM_SIZE, SENT_RET },
563  { 2, WM_MOVE, SENT },
564  { 2, WM_MOVE, SENT_RET },
565  { 1, WM_PARENTNOTIFY, SENT },
566  { 1, WM_PARENTNOTIFY, SENT_RET },
567  { 1, WM_NCCREATE, MARKER },
568  { 1, WM_NCCREATE, SENT_RET },
569  { 1, WM_NCCALCSIZE, SENT },
570  { 1, WM_NCCALCSIZE, SENT_RET },
571  { 1, WM_CREATE, SENT },
572  { 1, WM_CREATE, SENT_RET },
573  { 0, 0 }
574 };
575 
576 
577 
578 static void Test_Messages_Child(void)
579 {
580  HWND hWnd;
581  BOOL Below8NonServer = !IsWindows8OrGreater() && !IsWindowsServer();
582 
583  RegisterSimpleClass(MSGTestProc2, L"Test_Message_Window_X2");
584  RegisterSimpleClass(MSGChildProc2, L"Test_Message_Window_Child2");
585 
586  g_ChangeStyle = 0;
587 
592  g_FaultLine = __LINE__ + 1;
593  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_X2", L"", 0, 10, 20,
594  200, 210, NULL, NULL, 0, NULL);
595 
596  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
600  EMPTY_CACHE();
601 
606  g_FaultLine = __LINE__ + 1;
607  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_X2", L"", WS_OVERLAPPEDWINDOW, 10, 20,
608  200, 210, NULL, NULL, 0, NULL);
609 
610  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
614  EMPTY_CACHE();
615 
616  g_ChangeStyle = 1;
617 
622  g_FaultLine = __LINE__ + 1;
623  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_X2", L"", 0, 10, 20,
624  200, 210, NULL, NULL, 0, NULL);
625 
626  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
630  EMPTY_CACHE();
631 
636  g_FaultLine = __LINE__ + 1;
637  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_X2", L"", WS_OVERLAPPEDWINDOW, 10, 20,
638  200, 210, NULL, NULL, 0, NULL);
639 
640  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
644  EMPTY_CACHE();
645 
646  UnregisterClassW(L"Test_Message_Window_X2", NULL);
647  UnregisterClassW(L"Test_Message_Window_Child2", NULL);
648 }
649 
650 
651 
653 {
654  LRESULT lRet;
655  int iwnd = get_iwnd(hWnd);
656 
657  if(message > WM_USER || !iwnd || IsDWmMsg(message) || IseKeyMsg(message))
659 
660  switch(message)
661  {
662  case WM_IME_SETCONTEXT:
663  case WM_IME_NOTIFY:
664  case WM_GETICON:
665  case WM_GETTEXT:
667  break;
668  case WM_NCCREATE:
669  {
671  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
672  ok_hex_(create->style, g_NcExpectStyle);
673  ok_hex_(create->dwExStyle, g_NcExpectExStyle);
674  }
675  break;
676  case WM_CREATE:
677  {
678  CLIENTCREATESTRUCT ccs = { 0 };
680  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
681  ok_hex_(create->style, g_ExpectStyle);
682  ok_hex_(create->dwExStyle, g_ExpectExStyle);
683 
684  g_hwndMDIClient = CreateWindow("MDICLIENT", (LPCTSTR) NULL,
686  0, 0, 0, 0, hWnd, (HMENU) 0xCAC, NULL, (LPSTR) &ccs);
687 
689 
690  }
691  break;
692  case WM_NCCALCSIZE:
693  case WM_STYLECHANGING:
694  case WM_STYLECHANGED:
695  case WM_SIZE:
696  RECORD_MESSAGE(iwnd, message, SENT, wParam, 0);
697  break;
699  case WM_WINDOWPOSCHANGED:
700  ok(wParam == 0,"expected wParam=0\n");
701  RECORD_MESSAGE(iwnd, message, SENT, ((WINDOWPOS*)lParam)->flags, 0);
702  break;
703  default:
704  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
705  break;
706  }
708  RECORD_MESSAGE(iwnd, message, SENT_RET, 0, 0);
709  return lRet;
710 }
711 
713 {
714  { 1, WM_GETMINMAXINFO, SENT },
715  { 1, WM_GETMINMAXINFO, SENT_RET },
716  { 1, WM_NCCREATE, SENT },
717  { 1, WM_NCCREATE, SENT_RET },
718  { 1, WM_NCCALCSIZE, SENT },
719  { 1, WM_NCCALCSIZE, SENT_RET },
720  { 1, WM_CREATE, SENT },
721  { 1, WM_PARENTNOTIFY, SENT },
722  { 1, WM_PARENTNOTIFY, SENT_RET },
723  { 1, WM_CREATE, SENT_RET },
724  { 0, 0 }
725 };
726 
727 static void Test_Messages_MDI(void)
728 {
729  HWND hWnd;
730 
731  RegisterSimpleClass(MSGTestProcMDI, L"Test_Message_Window_MDI_XX");
732 
735  g_FaultLine = __LINE__ + 1;
736  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_MDI_XX", L"", 0, 10, 20,
737  200, 210, NULL, NULL, 0, NULL);
738 
739  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
743  EMPTY_CACHE();
744 
747  g_FaultLine = __LINE__ + 1;
748  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_MDI_XX", L"", WS_OVERLAPPEDWINDOW, 10, 20,
749  200, 210, NULL, NULL, 0, NULL);
750 
751  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
755  EMPTY_CACHE();
756 
757  UnregisterClassW(L"Test_Message_Window_MDI_XX", NULL);
758 }
759 
760 
762 {
763  LRESULT lRet;
764  int iwnd = get_iwnd(hWnd);
765 
766  if(message > WM_USER || !iwnd || IsDWmMsg(message) || IseKeyMsg(message))
768 
769  switch(message)
770  {
771  case WM_IME_SETCONTEXT:
772  case WM_IME_NOTIFY:
773  case WM_GETICON:
774  case WM_GETTEXT:
776  break;
777  case WM_NCCREATE:
778  {
780  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
781  ok_hex_(create->style, g_NcExpectStyle);
782  ok_hex_(create->dwExStyle, g_NcExpectExStyle);
783  }
784  break;
785  case WM_CREATE:
786  {
787  MDICREATESTRUCT mcs = {0};
788  CLIENTCREATESTRUCT ccs = { 0 };
790  HWND hchild;
791  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
792  ok_hex_(create->style, g_ExpectStyle);
793  ok_hex_(create->dwExStyle, g_ExpectExStyle);
794 
795 
796  g_hwndMDIClient = CreateWindow("MDICLIENT", (LPCTSTR) NULL,
798  0, 0, 0, 0, hWnd, (HMENU) 0xCAC, NULL, (LPSTR) &ccs);
799 
801 
802 
803  mcs.szClass = "Test_Message_MDI_Window_Child2";
804  mcs.x = mcs.cx = CW_USEDEFAULT;
805  mcs.y = mcs.cy = CW_USEDEFAULT;
806  mcs.style = WS_MAXIMIZE;
807 
809  (LPARAM)&mcs);
810  ok(hchild == g_ChildWindow, "We are testing with %p instead of %p\n", g_ChildWindow, hchild);
811 
812  }
813  break;
814  case WM_NCCALCSIZE:
815  case WM_STYLECHANGING:
816  case WM_STYLECHANGED:
817  case WM_SIZE:
818  RECORD_MESSAGE(iwnd, message, SENT, wParam, 0);
819  break;
821  case WM_WINDOWPOSCHANGED:
822  ok(wParam == 0,"expected wParam=0\n");
823  RECORD_MESSAGE(iwnd, message, SENT, ((WINDOWPOS*)lParam)->flags, 0);
824  break;
825  default:
826  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
827  break;
828  }
830  RECORD_MESSAGE(iwnd, message, SENT_RET, 0, 0);
831  return lRet;
832 }
833 
835 {
836  LRESULT lRet;
837  int iwnd = get_iwnd(hWnd);
838 
839  if(message > WM_USER || !iwnd || IsDWmMsg(message) || IseKeyMsg(message))
841 
842  switch(message)
843  {
844  case WM_IME_SETCONTEXT:
845  case WM_IME_NOTIFY:
846  case WM_GETICON:
847  case WM_GETTEXT:
849  break;
850  case WM_NCCREATE:
851  {
853  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
856  }
857  break;
858  case WM_CREATE:
859  {
861  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
863  ok_hex_(create->dwExStyle, g_ChildExpectExStyle);
864  }
865  break;
866  case WM_NCCALCSIZE:
867  case WM_STYLECHANGING:
868  case WM_STYLECHANGED:
869  case WM_SIZE:
870  RECORD_MESSAGE(iwnd, message, SENT, wParam, 0);
871  break;
873  case WM_WINDOWPOSCHANGED:
874  ok(wParam == 0,"expected wParam=0\n");
875  RECORD_MESSAGE(iwnd, message, SENT, ((WINDOWPOS*)lParam)->flags, 0);
876  break;
877  default:
878  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
879  break;
880  }
882  RECORD_MESSAGE(iwnd, message, SENT_RET, 0, 0);
883  return lRet;
884 }
885 
886 
888 {
889  { 1, WM_GETMINMAXINFO, SENT },
890  { 1, WM_GETMINMAXINFO, SENT_RET },
891  { 1, WM_NCCREATE, SENT },
892  { 1, WM_NCCREATE, SENT_RET },
893  { 1, WM_NCCALCSIZE, SENT },
894  { 1, WM_NCCALCSIZE, SENT_RET },
895  { 1, WM_CREATE, SENT },
896  { 1, WM_PARENTNOTIFY, SENT },
897  { 1, WM_PARENTNOTIFY, SENT_RET },
898  { 2, WM_GETMINMAXINFO, SENT },
899  { 2, WM_GETMINMAXINFO, SENT_RET },
900  { 2, WM_NCCREATE, SENT },
901  { 2, WM_NCCREATE, SENT_RET },
902  { 2, WM_NCCALCSIZE, SENT },
903  { 2, WM_NCCALCSIZE, SENT_RET },
904  { 2, WM_CREATE, SENT },
905  { 2, WM_CREATE, SENT_RET },
906  { 2, WM_SIZE, SENT },
907  { 2, WM_SIZE, SENT_RET },
908  { 2, WM_MOVE, SENT },
909  { 2, WM_MOVE, SENT_RET },
910  { 2, WM_GETMINMAXINFO, SENT },
911  { 2, WM_GETMINMAXINFO, SENT_RET },
913  { 2, WM_GETMINMAXINFO, SENT },
914  { 2, WM_GETMINMAXINFO, SENT_RET },
916  { 2, WM_NCCALCSIZE, SENT, 1 },
917  { 2, WM_NCCALCSIZE, SENT_RET },
919  { 2, WM_MOVE, SENT },
920  { 2, WM_MOVE, SENT_RET },
921  { 2, WM_SIZE, SENT, SIZE_MAXIMIZED },
924  { 1, WM_NCCALCSIZE, SENT, TRUE },
925  { 1, WM_NCCALCSIZE, SENT_RET },
928  { 2, WM_SIZE, SENT_RET },
930  { 2, WM_NCCALCSIZE, SENT, TRUE },
931  { 2, WM_NCCALCSIZE, SENT_RET },
932  { 2, WM_SHOWWINDOW, SENT },
933  { 2, WM_SHOWWINDOW, SENT_RET },
936  { 2, WM_CHILDACTIVATE, SENT },
939  { 2, WM_MDIACTIVATE, SENT },
940  { 2, WM_MDIACTIVATE, SENT_RET },
941  { 2, WM_CHILDACTIVATE, SENT_RET },
944  { 1, WM_NCCALCSIZE, SENT, TRUE },
945  { 1, WM_NCCALCSIZE, SENT_RET },
948  { 1, WM_CREATE, SENT_RET },
949  { 0, 0 },
950 };
951 
953 {
954  { 1, WM_GETMINMAXINFO, SENT },
955  { 1, WM_GETMINMAXINFO, SENT_RET },
956  { 1, WM_NCCREATE, SENT },
957  { 1, WM_NCCREATE, SENT_RET },
958  { 1, WM_NCCALCSIZE, SENT },
959  { 1, WM_NCCALCSIZE, SENT_RET },
960  { 1, WM_CREATE, SENT },
961  { 1, WM_PARENTNOTIFY, SENT },
962  { 1, WM_PARENTNOTIFY, SENT_RET },
963  { 2, WM_GETMINMAXINFO, SENT },
964  { 2, WM_GETMINMAXINFO, SENT_RET },
965  { 2, WM_NCCREATE, SENT },
966  { 2, WM_NCCREATE, SENT_RET },
967  { 2, WM_NCCALCSIZE, SENT },
968  { 2, WM_NCCALCSIZE, SENT_RET },
969  { 2, WM_CREATE, SENT },
970  { 2, WM_CREATE, SENT_RET },
971  { 2, WM_SIZE, SENT },
972  { 2, WM_SIZE, SENT_RET },
973  { 2, WM_MOVE, SENT },
974  { 2, WM_MOVE, SENT_RET },
975  { 2, WM_GETMINMAXINFO, SENT },
976  { 2, WM_GETMINMAXINFO, SENT_RET },
978  { 2, WM_GETMINMAXINFO, SENT },
979  { 2, WM_GETMINMAXINFO, SENT_RET },
981  { 2, WM_NCCALCSIZE, SENT, 1 },
982  { 2, WM_NCCALCSIZE, SENT_RET },
984  { 2, WM_MOVE, SENT },
985  { 2, WM_MOVE, SENT_RET },
986  { 2, WM_SIZE, SENT, SIZE_MAXIMIZED },
989  { 1, WM_NCCALCSIZE, SENT, TRUE },
990  { 1, WM_NCCALCSIZE, SENT_RET },
993  { 2, WM_SIZE, SENT_RET },
995  //{ 2, WM_NCCALCSIZE, SENT, TRUE },
996  //{ 2, WM_NCCALCSIZE, SENT_RET },
997  { 2, WM_SHOWWINDOW, SENT },
998  { 2, WM_SHOWWINDOW, SENT_RET },
1001  { 2, WM_CHILDACTIVATE, SENT },
1004  { 2, WM_MDIACTIVATE, SENT },
1005  { 2, WM_MDIACTIVATE, SENT_RET },
1006  { 2, WM_CHILDACTIVATE, SENT_RET },
1009  { 1, WM_NCCALCSIZE, SENT, TRUE },
1010  { 1, WM_NCCALCSIZE, SENT_RET },
1012  { 1, WM_WINDOWPOSCHANGED, SENT_RET },
1013  { 1, WM_CREATE, SENT_RET },
1014  { 0, 0 },
1015 };
1016 
1018 {
1019  { 1, WM_GETMINMAXINFO, SENT },
1020  { 1, WM_GETMINMAXINFO, SENT_RET },
1021  { 1, WM_NCCREATE, SENT },
1022  { 1, WM_NCCREATE, SENT_RET },
1023  { 1, WM_NCCALCSIZE, SENT },
1024  { 1, WM_NCCALCSIZE, SENT_RET },
1025  { 1, WM_CREATE, SENT },
1026  { 1, WM_PARENTNOTIFY, SENT },
1027  { 1, WM_PARENTNOTIFY, SENT_RET },
1028  { 2, WM_GETMINMAXINFO, SENT },
1029  { 2, WM_GETMINMAXINFO, SENT_RET },
1030  { 2, WM_NCCREATE, SENT },
1031  { 2, WM_NCCREATE, SENT_RET },
1032  { 2, WM_NCCALCSIZE, SENT },
1033  { 2, WM_NCCALCSIZE, SENT_RET },
1034  { 2, WM_CREATE, SENT },
1035  { 2, WM_CREATE, SENT_RET },
1036  { 2, WM_SIZE, SENT },
1037  { 2, WM_SIZE, SENT_RET },
1038  { 2, WM_MOVE, SENT },
1039  { 2, WM_MOVE, SENT_RET },
1040  { 2, WM_GETMINMAXINFO, SENT },
1041  { 2, WM_GETMINMAXINFO, SENT_RET },
1043  { 2, WM_GETMINMAXINFO, SENT },
1044  { 2, WM_GETMINMAXINFO, SENT_RET },
1046  { 2, WM_NCCALCSIZE, SENT, 1 },
1047  { 2, WM_NCCALCSIZE, SENT_RET },
1049  { 2, WM_MOVE, SENT },
1050  { 2, WM_MOVE, SENT_RET },
1051  { 2, WM_SIZE, SENT, SIZE_MAXIMIZED },
1054  { 1, WM_NCCALCSIZE, SENT, TRUE },
1055  { 1, WM_NCCALCSIZE, SENT_RET },
1057  { 1, WM_WINDOWPOSCHANGED, SENT_RET },
1058  // +
1059  { 1, WM_NCCALCSIZE, SENT, TRUE },
1060  { 1, WM_NCCALCSIZE, SENT_RET },
1061  // -
1062  { 2, WM_SIZE, SENT_RET },
1063  { 2, WM_WINDOWPOSCHANGED, SENT_RET },
1064  { 2, WM_NCCALCSIZE, SENT, TRUE },
1065  { 2, WM_NCCALCSIZE, SENT_RET },
1066  { 2, WM_SHOWWINDOW, SENT },
1067  { 2, WM_SHOWWINDOW, SENT_RET },
1070  { 2, WM_CHILDACTIVATE, SENT },
1073  { 2, WM_MDIACTIVATE, SENT },
1074  { 2, WM_MDIACTIVATE, SENT_RET },
1075  { 2, WM_CHILDACTIVATE, SENT_RET },
1078  { 1, WM_NCCALCSIZE, SENT, TRUE },
1079  { 1, WM_NCCALCSIZE, SENT_RET },
1081  { 1, WM_WINDOWPOSCHANGED, SENT_RET },
1082  { 1, WM_CREATE, SENT_RET },
1083  { 0, 0 },
1084 };
1085 
1086 static void Test_Messages_MDI_Child(void)
1087 {
1088  HWND hWnd;
1089 
1090  BOOL Below8 = !IsWindows8OrGreater();
1091  BOOL Below8NonServer = !IsWindows8OrGreater() && !IsWindowsServer();
1092 
1093  RegisterSimpleClass(MSGTestProcMDI2, L"Test_Message_MDI_Window_X2");
1094  RegisterSimpleClass(MSGChildProcMDI2, L"Test_Message_MDI_Window_Child2");
1095 
1100  g_FaultLine = __LINE__ + 1;
1101  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_MDI_Window_X2", L"", 0, 10, 20,
1102  200, 210, NULL, NULL, 0, NULL);
1103 
1104  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
1108  EMPTY_CACHE();
1109 
1114  g_FaultLine = __LINE__ + 1;
1115  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_MDI_Window_X2", L"", WS_OVERLAPPEDWINDOW, 10, 20,
1116  200, 210, NULL, NULL, 0, NULL);
1117 
1118  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
1122  EMPTY_CACHE();
1123 
1124  UnregisterClassW(L"Test_Message_Window_X2", NULL);
1125  UnregisterClassW(L"Test_Message_MDI_Window_Child2", NULL);
1126 }
1127 
1128 
1130 {
1131  Test_Params();
1132  Test_Messages();
1136 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define VER_MINORVERSION
Definition: rtltypes.h:226
#define VER_NT_WORKSTATION
#define WS_EX_WINDOWEDGE
Definition: winuser.h:407
#define WM_IME_NOTIFY
Definition: winuser.h:1812
#define SWP_DRAWFRAME
Definition: winuser.h:1224
static void Test_Params(void)
Definition: tftpd.h:59
DWORD g_NcExpectStyle
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
ULONG dwMajorVersion
Definition: rtltypes.h:238
ULONGLONG NTAPI VerSetConditionMask(IN ULONGLONG ConditionMask, IN ULONG TypeMask, IN UCHAR Condition)
Definition: version.c:262
DWORD g_ExpectExStyle
#define CreateWindow
Definition: winuser.h:5729
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
OSVERSIONINFO osvi
Definition: ver.c:28
#define LOBYTE(W)
Definition: jmemdos.c:487
static void Test_Messages_MDI_Child(void)
Definition: msgtrace.h:14
#define SIZE_MAXIMIZED
Definition: winuser.h:2482
#define TRUE
Definition: types.h:120
MSG_ENTRY create_chain_MDI[]
#define WM_NCCALCSIZE
Definition: winuser.h:1667
#define ok_hex_(expression, result)
MSG_ENTRY child_create_chain_MDI[]
#define WM_GETTEXT
Definition: winuser.h:1600
MSG_ENTRY create_chain[]
#define CALLBACK
Definition: compat.h:35
HWND hWnd
Definition: settings.c:17
#define HIBYTE(W)
Definition: jmemdos.c:486
DWORD g_NcExpectExStyle
HANDLE HWND
Definition: compat.h:19
#define WM_SHOWWINDOW
Definition: winuser.h:1610
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
#define WM_MOVE
Definition: winuser.h:1592
#define GWL_EXSTYLE
Definition: winuser.h:845
static void Test_Messages_Child(void)
UINT_PTR WPARAM
Definition: windef.h:207
#define SetWindowLong
Definition: winuser.h:5828
#define WS_CHILD
Definition: pedump.c:617
#define SWP_NOZORDER
Definition: winuser.h:1232
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
MSG_ENTRY child_create_chain_modify_below8_nonsrv[]
char * LPSTR
Definition: xmlstorage.h:182
#define WS_CLIPCHILDREN
Definition: pedump.c:619
CREATESTRUCTA * LPCREATESTRUCT
Definition: winuser.h:5701
#define WM_NCCREATE
Definition: winuser.h:1665
BOOL WINAPI DestroyWindow(_In_ HWND)
static BOOL IsWindowsServer()
static HWND child
Definition: cursoricon.c:298
WPARAM wParam
Definition: combotst.c:138
DWORD g_FaultLine
MSG_ENTRY child_create_chain_MDI_below8[]
static BOOL IseKeyMsg(UINT msg)
Definition: msgtrace.h:52
#define WS_EX_MDICHILD
Definition: winuser.h:394
#define VER_PRODUCT_TYPE
Definition: rtltypes.h:233
#define FALSE
Definition: types.h:117
#define WM_PARENTNOTIFY
Definition: winuser.h:1785
#define WM_CHILDACTIVATE
Definition: winuser.h:1620
unsigned int BOOL
Definition: ntddk_ex.h:94
MSG_ENTRY create_chain_modify_below8_nonsrv[]
#define CreateWindowEx
Definition: winuser.h:5730
#define CW_USEDEFAULT
Definition: winuser.h:225
DWORD g_ChildNcExpectStyle
static void Test_Messages_MDI(void)
smooth NULL
Definition: ftsmooth.c:416
HWND g_hwndMDIClient
LONG_PTR LPARAM
Definition: windef.h:208
static BOOL IsWindows8OrGreater()
static int g_ChangeStyle
DWORD g_ChildExpectStyle
#define SW_SHOW
Definition: winuser.h:769
#define DefMDIChildProc
Definition: ros2win.h:33
DWORD g_ChildNcExpectExStyle
#define DefWindowProc
Definition: ros2win.h:31
MSG_ENTRY child_create_chain_MDI_below8_nonsrv[]
#define _WIN32_WINNT_WIN8
Definition: sdkddkver.h:29
static __inline ATOM RegisterSimpleClass(WNDPROC lpfnWndProc, LPCWSTR lpszClassName)
BOOL WINAPI VerifyVersionInfoW(IN LPOSVERSIONINFOEXW lpVersionInformation, IN DWORD dwTypeMask, IN DWORDLONG dwlConditionMask)
Definition: version.c:118
#define ERROR_TLW_WITH_WSCHILD
Definition: winerror.h:887
#define VER_EQUAL
Definition: rtltypes.h:237
#define ERROR_INVALID_WINDOW_HANDLE
Definition: winerror.h:881
MSG_ENTRY child_create_chain[]
static LRESULT CALLBACK MSGChildProcMDI2(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
static LRESULT CALLBACK MSGTestProcMDI(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
#define COMPARE_CACHE(msg_chain)
Definition: msgtrace.h:57
#define WM_SIZE
Definition: winuser.h:1593
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define WM_IME_SETCONTEXT
Definition: winuser.h:1811
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1643
#define WM_NCDESTROY
Definition: winuser.h:1666
#define VER_MAJORVERSION
Definition: rtltypes.h:227
DWORD g_ExpectStyle
static void Test_Messages(void)
HWND g_TestWindow
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD g_ChildExpectExStyle
#define SetLastError(x)
Definition: compat.h:500
static LRESULT CALLBACK MSGTestProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
#define WS_HSCROLL
Definition: pedump.c:628
GLbitfield flags
Definition: glext.h:7161
#define VER_SERVICEPACKMAJOR
Definition: rtltypes.h:231
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)
#define GetWindowLong
Definition: winuser.h:5771
#define EMPTY_CACHE()
Definition: msgtrace.h:59
ULONG dwMinorVersion
Definition: rtltypes.h:239
#define SWP_FRAMECHANGED
Definition: winuser.h:1225
#define WM_MDIACTIVATE
Definition: winuser.h:1796
#define WM_USER
Definition: winuser.h:1877
MSG_ENTRY child_create_chain_modify[]
#define VER_GREATER_EQUAL
Definition: rtltypes.h:239
#define SWP_NOSIZE
Definition: winuser.h:1230
static BOOL IsDWmMsg(UINT msg)
Definition: msgtrace.h:39
static LRESULT CALLBACK MSGChildProc2(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
#define WS_EX_OVERLAPPEDWINDOW
Definition: winuser.h:398
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
MSG_ENTRY create_chain_modify[]
#define ok(value,...)
Definition: atltest.h:57
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define WS_POPUP
Definition: pedump.c:616
unsigned int UINT
Definition: ndis.h:50
#define WS_VSCROLL
Definition: pedump.c:627
#define SWP_SHOWWINDOW
Definition: winuser.h:1233
#define SWP_NOREDRAW
Definition: winuser.h:1231
Definition: msgtrace.h:6
#define WM_MDICREATE
Definition: winuser.h:1794
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1644
unsigned long long DWORDLONG
Definition: intsafe.h:91
#define SendMessage
Definition: winuser.h:5818
#define WM_CREATE
Definition: winuser.h:1590
#define RECORD_MESSAGE(...)
Definition: msgtrace.h:60
static struct myctx * mcs
Definition: adnstest.c:53
static LRESULT CALLBACK MSGTestProc2(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
HWND g_ChildWindow
#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)
START_TEST(CreateWindowEx)
LONG_PTR LRESULT
Definition: windef.h:209
#define WS_VISIBLE
Definition: pedump.c:620
static const struct access_res create[16]
Definition: package.c:7720
static int get_iwnd(HWND hWnd)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
LPARAM lParam
Definition: combotst.c:139
#define WM_GETMINMAXINFO
Definition: winuser.h:1622
static LRESULT CALLBACK MSGTestProcMDI2(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
#define ok_(x1, x2)
Definition: atltest.h:61
#define WS_MAXIMIZE
Definition: pedump.c:623