ReactOS  0.4.14-dev-833-g5f692ed
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
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 #define ok_hex_(expression, result) \
98  do { \
99  int _value = (expression); \
100  ok_(__FILE__, g_FaultLine)(_value == (result), "Wrong value for '%s', expected: " #result " (0x%x), got: 0x%x\n", \
101  #expression, (int)(result), _value); \
102  } while (0)
103 
104 
105 
106 static int g_ChangeStyle = 0;
108 {
109  LRESULT lRet;
110  int iwnd = get_iwnd(hWnd);
111 
112  if(message > WM_USER || !iwnd || IsDWmMsg(message) || IseKeyMsg(message))
114 
115  switch(message)
116  {
117  case WM_IME_SETCONTEXT:
118  case WM_IME_NOTIFY:
119  case WM_GETICON:
120  case WM_GETTEXT:
122  break;
123  case WM_NCCREATE:
124  {
126  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
127  ok_hex_(create->style, g_NcExpectStyle);
128  ok_hex_(create->dwExStyle, g_NcExpectExStyle);
129  if (g_ChangeStyle)
130  {
131  DWORD dwStyle = GetWindowLong(hWnd, GWL_EXSTYLE);
132  dwStyle &= ~(WS_EX_CLIENTEDGE);
133  SetWindowLong(hWnd, GWL_EXSTYLE, dwStyle);
134  RECORD_MESSAGE(iwnd, message, MARKER, 0, 0);
135  SetWindowPos(hWnd, NULL, 0, 0, 0, 0,
137 
138  RECORD_MESSAGE(iwnd, message, MARKER, 0, 0);
139  ok_hex_(create->style, g_NcExpectStyle);
140  ok_hex_(create->dwExStyle, g_NcExpectExStyle);
141  }
142  }
143  break;
144  case WM_CREATE:
145  {
147  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
148  ok_hex_(create->style, g_ExpectStyle);
149  ok_hex_(create->dwExStyle, g_ExpectExStyle);
150  }
151  break;
152  case WM_NCCALCSIZE:
153  case WM_STYLECHANGING:
154  case WM_STYLECHANGED:
155  case WM_SIZE:
156  RECORD_MESSAGE(iwnd, message, SENT, wParam, 0);
157  break;
159  case WM_WINDOWPOSCHANGED:
160  ok(wParam == 0,"expected wParam=0\n");
161  RECORD_MESSAGE(iwnd, message, SENT, ((WINDOWPOS*)lParam)->flags, 0);
162  break;
163  default:
164  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
165  break;
166  }
168  RECORD_MESSAGE(iwnd, message, SENT_RET, 0, 0);
169  return lRet;
170 }
171 
173 {
174  { 1, WM_GETMINMAXINFO, SENT },
175  { 1, WM_GETMINMAXINFO, SENT_RET },
176  { 1, WM_NCCREATE, SENT },
177  { 1, WM_NCCREATE, SENT_RET },
178  { 1, WM_NCCALCSIZE, SENT },
179  { 1, WM_NCCALCSIZE, SENT_RET },
180  { 1, WM_CREATE, SENT },
181  { 1, WM_CREATE, SENT_RET },
182  { 0, 0 }
183 };
184 
186 {
187  { 1, WM_GETMINMAXINFO, SENT },
188  { 1, WM_GETMINMAXINFO, SENT_RET },
189  { 1, WM_NCCREATE, SENT },
190  { 1, WM_STYLECHANGING, SENT, GWL_EXSTYLE },
191  { 1, WM_STYLECHANGING, SENT_RET },
192  { 1, WM_STYLECHANGED, SENT, GWL_EXSTYLE },
193  { 1, WM_STYLECHANGED, SENT_RET },
194  { 1, WM_NCCREATE, MARKER },
197  { 1, WM_NCCALCSIZE, SENT, TRUE },
198  { 1, WM_NCCALCSIZE, SENT_RET },
200  { 1, WM_MOVE, SENT },
201  { 1, WM_MOVE, SENT_RET },
202  { 1, WM_SIZE, SENT },
203  { 1, WM_SIZE, SENT_RET },
205  { 1, WM_NCCREATE, MARKER },
206  { 1, WM_NCCREATE, SENT_RET },
207  { 1, WM_NCCALCSIZE, SENT },
208  { 1, WM_NCCALCSIZE, SENT_RET },
209  { 1, WM_CREATE, SENT },
210  { 1, WM_CREATE, SENT_RET },
211  { 0, 0 }
212 };
213 
215 {
216  { 1, WM_GETMINMAXINFO, SENT },
217  { 1, WM_GETMINMAXINFO, SENT_RET },
218  { 1, WM_NCCREATE, SENT },
219  { 1, WM_STYLECHANGING, SENT, GWL_EXSTYLE },
220  { 1, WM_STYLECHANGING, SENT_RET },
221  { 1, WM_STYLECHANGED, SENT, GWL_EXSTYLE },
222  { 1, WM_STYLECHANGED, SENT_RET },
223  { 1, WM_NCCREATE, MARKER },
226  { 1, WM_NCCALCSIZE, SENT, TRUE },
227  { 1, WM_NCCALCSIZE, SENT_RET },
229  { 1, WM_MOVE, SENT },
230  { 1, WM_MOVE, SENT_RET },
231  { 1, WM_SIZE, SENT },
232  { 1, WM_SIZE, SENT_RET },
234  { 1, WM_NCCALCSIZE, SENT, TRUE },
235  { 1, WM_NCCALCSIZE, SENT_RET },
236  { 1, WM_NCCREATE, MARKER },
237  { 1, WM_NCCREATE, SENT_RET },
238  { 1, WM_NCCALCSIZE, SENT },
239  { 1, WM_NCCALCSIZE, SENT_RET },
240  { 1, WM_CREATE, SENT },
241  { 1, WM_CREATE, SENT_RET },
242  { 0, 0 }
243 };
244 
245 
246 static BOOL
248 {
249  OSVERSIONINFOEXW osvi = { sizeof(osvi), 0, 0, 0, 0, {0}, 0, 0, 0, VER_NT_WORKSTATION };
250  DWORDLONG const dwlConditionMask = VerSetConditionMask( 0, VER_PRODUCT_TYPE, VER_EQUAL );
251 
252  return !VerifyVersionInfoW(&osvi, VER_PRODUCT_TYPE, dwlConditionMask);
253 }
254 
255 
256 static BOOL
258 {
259  OSVERSIONINFOEXW osvi = { sizeof(osvi), 0, 0, 0, 0, {0}, 0, 0 };
260  DWORDLONG const dwlConditionMask = VerSetConditionMask(VerSetConditionMask(
264 
267 
269 }
270 
271 static void Test_Messages(void)
272 {
273  HWND hWnd;
274  BOOL Below8NonServer = !IsWindows8OrGreater() && !IsWindowsServer();
275 
276  RegisterSimpleClass(MSGTestProc, L"Test_Message_Window_XX");
277 
278  g_ChangeStyle = 0;
279 
282  g_FaultLine = __LINE__ + 1;
283  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_XX", L"", 0, 10, 20,
284  200, 210, NULL, NULL, 0, NULL);
285 
286  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
290  EMPTY_CACHE();
291 
294  g_FaultLine = __LINE__ + 1;
295  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_XX", L"", WS_OVERLAPPEDWINDOW, 10, 20,
296  200, 210, NULL, NULL, 0, NULL);
297 
298  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
302  EMPTY_CACHE();
303 
304  g_ChangeStyle = 1;
305 
308  g_FaultLine = __LINE__ + 1;
309  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_XX", L"", 0, 10, 20,
310  200, 210, NULL, NULL, 0, NULL);
311 
312  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
316  EMPTY_CACHE();
317 
320  g_FaultLine = __LINE__ + 1;
321  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_XX", L"", WS_OVERLAPPEDWINDOW, 10, 20,
322  200, 210, NULL, NULL, 0, NULL);
323 
324  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
328  EMPTY_CACHE();
329 
330  UnregisterClassW(L"Test_Message_Window_XX", NULL);
331 }
332 
333 
335 {
336  LRESULT lRet;
337  int iwnd = get_iwnd(hWnd);
338 
339  if(message > WM_USER || !iwnd || IsDWmMsg(message) || IseKeyMsg(message))
341 
342  switch(message)
343  {
344  case WM_IME_SETCONTEXT:
345  case WM_IME_NOTIFY:
346  case WM_GETICON:
347  case WM_GETTEXT:
349  break;
350  case WM_NCCREATE:
351  {
353  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
356 
357  if (g_ChangeStyle)
358  {
360  dwStyle &= ~(WS_EX_CLIENTEDGE);
362  RECORD_MESSAGE(iwnd, message, MARKER, 0, 0);
363  SetWindowPos(g_TestWindow, NULL, 0, 0, 0, 0,
365 
366  RECORD_MESSAGE(iwnd, message, MARKER, 0, 0);
369  }
370  }
371  break;
372  case WM_CREATE:
373  {
375  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
377  ok_hex_(create->dwExStyle, g_ChildExpectExStyle);
378  }
379  break;
380  case WM_NCCALCSIZE:
381  case WM_STYLECHANGING:
382  case WM_STYLECHANGED:
383  case WM_SIZE:
384  RECORD_MESSAGE(iwnd, message, SENT, wParam, 0);
385  break;
387  case WM_WINDOWPOSCHANGED:
388  ok(wParam == 0,"expected wParam=0\n");
389  RECORD_MESSAGE(iwnd, message, SENT, ((WINDOWPOS*)lParam)->flags, 0);
390  break;
391  default:
392  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
393  break;
394  }
396  RECORD_MESSAGE(iwnd, message, SENT_RET, 0, 0);
397  return lRet;
398 }
399 
400 
402 {
403  LRESULT lRet;
404  int iwnd = get_iwnd(hWnd);
405 
406  if(message > WM_USER || !iwnd || IsDWmMsg(message) || IseKeyMsg(message))
408 
409  switch(message)
410  {
411  case WM_IME_SETCONTEXT:
412  case WM_IME_NOTIFY:
413  case WM_GETICON:
414  case WM_GETTEXT:
416  break;
417  case WM_NCCREATE:
418  {
419  HWND child;
421  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
422  ok_hex_(create->style, g_NcExpectStyle);
423  ok_hex_(create->dwExStyle, g_NcExpectExStyle);
424 
425  child = CreateWindowExW(0, L"Test_Message_Window_Child2", L"", WS_CHILD, 0, 0, 10, 10, hWnd, NULL, 0, NULL);
426  RECORD_MESSAGE(iwnd, message, MARKER, 0, 0);
427  ok_(__FILE__, g_FaultLine)(g_ChildWindow == child, "Testing against the wrong child!\n");
428  }
429  break;
430  case WM_NCDESTROY:
431  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
433  break;
434  case WM_CREATE:
435  {
437  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
438  ok_hex_(create->style, g_ExpectStyle);
439  ok_hex_(create->dwExStyle, g_ExpectExStyle);
440  }
441  break;
442  case WM_NCCALCSIZE:
443  case WM_STYLECHANGING:
444  case WM_STYLECHANGED:
445  case WM_SIZE:
446  RECORD_MESSAGE(iwnd, message, SENT, wParam, 0);
447  break;
449  case WM_WINDOWPOSCHANGED:
450  ok(wParam == 0,"expected wParam=0\n");
451  RECORD_MESSAGE(iwnd, message, SENT, ((WINDOWPOS*)lParam)->flags, 0);
452  break;
453  default:
454  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
455  break;
456  }
458  RECORD_MESSAGE(iwnd, message, SENT_RET, 0, 0);
459  return lRet;
460 }
461 
462 
464 {
465  { 1, WM_GETMINMAXINFO, SENT },
466  { 1, WM_GETMINMAXINFO, SENT_RET },
467  { 1, WM_NCCREATE, SENT },
468  { 2, WM_NCCREATE, SENT },
469  { 2, WM_NCCREATE, SENT_RET },
470  { 2, WM_NCCALCSIZE, SENT },
471  { 2, WM_NCCALCSIZE, SENT_RET },
472  { 2, WM_CREATE, SENT },
473  { 2, WM_CREATE, SENT_RET },
474  { 2, WM_SIZE, SENT },
475  { 2, WM_SIZE, SENT_RET },
476  { 2, WM_MOVE, SENT },
477  { 2, WM_MOVE, SENT_RET },
478  { 1, WM_PARENTNOTIFY, SENT },
479  { 1, WM_PARENTNOTIFY, SENT_RET },
480  { 1, WM_NCCREATE, MARKER },
481  { 1, WM_NCCREATE, SENT_RET },
482  { 1, WM_NCCALCSIZE, SENT },
483  { 1, WM_NCCALCSIZE, SENT_RET },
484  { 1, WM_CREATE, SENT },
485  { 1, WM_CREATE, SENT_RET },
486  { 0, 0 }
487 };
488 
490 {
491  { 1, WM_GETMINMAXINFO, SENT },
492  { 1, WM_GETMINMAXINFO, SENT_RET },
493  { 1, WM_NCCREATE, SENT },
494  { 2, WM_NCCREATE, SENT },
495  { 1, WM_STYLECHANGING, SENT, GWL_EXSTYLE },
496  { 1, WM_STYLECHANGING, SENT_RET },
497  { 1, WM_STYLECHANGED, SENT, GWL_EXSTYLE },
498  { 1, WM_STYLECHANGED, SENT_RET },
499  { 2, WM_NCCREATE, MARKER },
502  { 1, WM_NCCALCSIZE, SENT, TRUE },
503  { 1, WM_NCCALCSIZE, SENT_RET },
505  { 1, WM_MOVE, SENT },
506  { 1, WM_MOVE, SENT_RET },
507  { 1, WM_SIZE, SENT },
508  { 1, WM_SIZE, SENT_RET },
510  { 2, WM_NCCREATE, MARKER },
511  { 2, WM_NCCREATE, SENT_RET },
512  { 2, WM_NCCALCSIZE, SENT },
513  { 2, WM_NCCALCSIZE, SENT_RET },
514  { 2, WM_CREATE, SENT },
515  { 2, WM_CREATE, SENT_RET },
516  { 2, WM_SIZE, SENT },
517  { 2, WM_SIZE, SENT_RET },
518  { 2, WM_MOVE, SENT },
519  { 2, WM_MOVE, SENT_RET },
520  { 1, WM_PARENTNOTIFY, SENT },
521  { 1, WM_PARENTNOTIFY, SENT_RET },
522  { 1, WM_NCCREATE, MARKER },
523  { 1, WM_NCCREATE, SENT_RET },
524  { 1, WM_NCCALCSIZE, SENT },
525  { 1, WM_NCCALCSIZE, SENT_RET },
526  { 1, WM_CREATE, SENT },
527  { 1, WM_CREATE, SENT_RET },
528  { 0, 0 }
529 };
530 
532 {
533  { 1, WM_GETMINMAXINFO, SENT },
534  { 1, WM_GETMINMAXINFO, SENT_RET },
535  { 1, WM_NCCREATE, SENT },
536  { 2, WM_NCCREATE, SENT },
537  { 1, WM_STYLECHANGING, SENT, GWL_EXSTYLE },
538  { 1, WM_STYLECHANGING, SENT_RET },
539  { 1, WM_STYLECHANGED, SENT, GWL_EXSTYLE },
540  { 1, WM_STYLECHANGED, SENT_RET },
541  { 2, WM_NCCREATE, MARKER },
544  { 1, WM_NCCALCSIZE, SENT, TRUE },
545  { 1, WM_NCCALCSIZE, SENT_RET },
547  { 1, WM_MOVE, SENT },
548  { 1, WM_MOVE, SENT_RET },
549  { 1, WM_SIZE, SENT },
550  { 1, WM_SIZE, SENT_RET },
552  { 1, WM_NCCALCSIZE, SENT, TRUE },
553  { 1, WM_NCCALCSIZE, SENT_RET },
554  { 2, WM_NCCREATE, MARKER },
555  { 2, WM_NCCREATE, SENT_RET },
556  { 2, WM_NCCALCSIZE, SENT },
557  { 2, WM_NCCALCSIZE, SENT_RET },
558  { 2, WM_CREATE, SENT },
559  { 2, WM_CREATE, SENT_RET },
560  { 2, WM_SIZE, SENT },
561  { 2, WM_SIZE, SENT_RET },
562  { 2, WM_MOVE, SENT },
563  { 2, WM_MOVE, SENT_RET },
564  { 1, WM_PARENTNOTIFY, SENT },
565  { 1, WM_PARENTNOTIFY, SENT_RET },
566  { 1, WM_NCCREATE, MARKER },
567  { 1, WM_NCCREATE, SENT_RET },
568  { 1, WM_NCCALCSIZE, SENT },
569  { 1, WM_NCCALCSIZE, SENT_RET },
570  { 1, WM_CREATE, SENT },
571  { 1, WM_CREATE, SENT_RET },
572  { 0, 0 }
573 };
574 
575 
576 
577 static void Test_Messages_Child(void)
578 {
579  HWND hWnd;
580  BOOL Below8NonServer = !IsWindows8OrGreater() && !IsWindowsServer();
581 
582  RegisterSimpleClass(MSGTestProc2, L"Test_Message_Window_X2");
583  RegisterSimpleClass(MSGChildProc2, L"Test_Message_Window_Child2");
584 
585  g_ChangeStyle = 0;
586 
591  g_FaultLine = __LINE__ + 1;
592  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_X2", L"", 0, 10, 20,
593  200, 210, NULL, NULL, 0, NULL);
594 
595  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
599  EMPTY_CACHE();
600 
605  g_FaultLine = __LINE__ + 1;
606  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_X2", L"", WS_OVERLAPPEDWINDOW, 10, 20,
607  200, 210, NULL, NULL, 0, NULL);
608 
609  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
613  EMPTY_CACHE();
614 
615  g_ChangeStyle = 1;
616 
621  g_FaultLine = __LINE__ + 1;
622  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_X2", L"", 0, 10, 20,
623  200, 210, NULL, NULL, 0, NULL);
624 
625  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
629  EMPTY_CACHE();
630 
635  g_FaultLine = __LINE__ + 1;
636  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_X2", L"", WS_OVERLAPPEDWINDOW, 10, 20,
637  200, 210, NULL, NULL, 0, NULL);
638 
639  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
643  EMPTY_CACHE();
644 
645  UnregisterClassW(L"Test_Message_Window_X2", NULL);
646  UnregisterClassW(L"Test_Message_Window_Child2", NULL);
647 }
648 
649 
650 
652 {
653  LRESULT lRet;
654  int iwnd = get_iwnd(hWnd);
655 
656  if(message > WM_USER || !iwnd || IsDWmMsg(message) || IseKeyMsg(message))
658 
659  switch(message)
660  {
661  case WM_IME_SETCONTEXT:
662  case WM_IME_NOTIFY:
663  case WM_GETICON:
664  case WM_GETTEXT:
666  break;
667  case WM_NCCREATE:
668  {
670  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
671  ok_hex_(create->style, g_NcExpectStyle);
672  ok_hex_(create->dwExStyle, g_NcExpectExStyle);
673  }
674  break;
675  case WM_CREATE:
676  {
677  CLIENTCREATESTRUCT ccs = { 0 };
679  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
680  ok_hex_(create->style, g_ExpectStyle);
681  ok_hex_(create->dwExStyle, g_ExpectExStyle);
682 
683  g_hwndMDIClient = CreateWindow("MDICLIENT", (LPCTSTR) NULL,
685  0, 0, 0, 0, hWnd, (HMENU) 0xCAC, NULL, (LPSTR) &ccs);
686 
688 
689  }
690  break;
691  case WM_NCCALCSIZE:
692  case WM_STYLECHANGING:
693  case WM_STYLECHANGED:
694  case WM_SIZE:
695  RECORD_MESSAGE(iwnd, message, SENT, wParam, 0);
696  break;
698  case WM_WINDOWPOSCHANGED:
699  ok(wParam == 0,"expected wParam=0\n");
700  RECORD_MESSAGE(iwnd, message, SENT, ((WINDOWPOS*)lParam)->flags, 0);
701  break;
702  default:
703  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
704  break;
705  }
707  RECORD_MESSAGE(iwnd, message, SENT_RET, 0, 0);
708  return lRet;
709 }
710 
712 {
713  { 1, WM_GETMINMAXINFO, SENT },
714  { 1, WM_GETMINMAXINFO, SENT_RET },
715  { 1, WM_NCCREATE, SENT },
716  { 1, WM_NCCREATE, SENT_RET },
717  { 1, WM_NCCALCSIZE, SENT },
718  { 1, WM_NCCALCSIZE, SENT_RET },
719  { 1, WM_CREATE, SENT },
720  { 1, WM_PARENTNOTIFY, SENT },
721  { 1, WM_PARENTNOTIFY, SENT_RET },
722  { 1, WM_CREATE, SENT_RET },
723  { 0, 0 }
724 };
725 
726 static void Test_Messages_MDI(void)
727 {
728  HWND hWnd;
729 
730  RegisterSimpleClass(MSGTestProcMDI, L"Test_Message_Window_MDI_XX");
731 
734  g_FaultLine = __LINE__ + 1;
735  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_MDI_XX", L"", 0, 10, 20,
736  200, 210, NULL, NULL, 0, NULL);
737 
738  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
742  EMPTY_CACHE();
743 
746  g_FaultLine = __LINE__ + 1;
747  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_Window_MDI_XX", L"", WS_OVERLAPPEDWINDOW, 10, 20,
748  200, 210, NULL, NULL, 0, NULL);
749 
750  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
754  EMPTY_CACHE();
755 
756  UnregisterClassW(L"Test_Message_Window_MDI_XX", NULL);
757 }
758 
759 
761 {
762  LRESULT lRet;
763  int iwnd = get_iwnd(hWnd);
764 
765  if(message > WM_USER || !iwnd || IsDWmMsg(message) || IseKeyMsg(message))
767 
768  switch(message)
769  {
770  case WM_IME_SETCONTEXT:
771  case WM_IME_NOTIFY:
772  case WM_GETICON:
773  case WM_GETTEXT:
775  break;
776  case WM_NCCREATE:
777  {
779  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
780  ok_hex_(create->style, g_NcExpectStyle);
781  ok_hex_(create->dwExStyle, g_NcExpectExStyle);
782  }
783  break;
784  case WM_CREATE:
785  {
786  MDICREATESTRUCT mcs = {0};
787  CLIENTCREATESTRUCT ccs = { 0 };
789  HWND hchild;
790  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
791  ok_hex_(create->style, g_ExpectStyle);
792  ok_hex_(create->dwExStyle, g_ExpectExStyle);
793 
794 
795  g_hwndMDIClient = CreateWindow("MDICLIENT", (LPCTSTR) NULL,
797  0, 0, 0, 0, hWnd, (HMENU) 0xCAC, NULL, (LPSTR) &ccs);
798 
800 
801 
802  mcs.szClass = "Test_Message_MDI_Window_Child2";
803  mcs.x = mcs.cx = CW_USEDEFAULT;
804  mcs.y = mcs.cy = CW_USEDEFAULT;
805  mcs.style = WS_MAXIMIZE;
806 
808  (LPARAM)&mcs);
809  ok(hchild == g_ChildWindow, "We are testing with %p instead of %p\n", g_ChildWindow, hchild);
810 
811  }
812  break;
813  case WM_NCCALCSIZE:
814  case WM_STYLECHANGING:
815  case WM_STYLECHANGED:
816  case WM_SIZE:
817  RECORD_MESSAGE(iwnd, message, SENT, wParam, 0);
818  break;
820  case WM_WINDOWPOSCHANGED:
821  ok(wParam == 0,"expected wParam=0\n");
822  RECORD_MESSAGE(iwnd, message, SENT, ((WINDOWPOS*)lParam)->flags, 0);
823  break;
824  default:
825  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
826  break;
827  }
829  RECORD_MESSAGE(iwnd, message, SENT_RET, 0, 0);
830  return lRet;
831 }
832 
834 {
835  LRESULT lRet;
836  int iwnd = get_iwnd(hWnd);
837 
838  if(message > WM_USER || !iwnd || IsDWmMsg(message) || IseKeyMsg(message))
840 
841  switch(message)
842  {
843  case WM_IME_SETCONTEXT:
844  case WM_IME_NOTIFY:
845  case WM_GETICON:
846  case WM_GETTEXT:
848  break;
849  case WM_NCCREATE:
850  {
852  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
855  }
856  break;
857  case WM_CREATE:
858  {
860  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
862  ok_hex_(create->dwExStyle, g_ChildExpectExStyle);
863  }
864  break;
865  case WM_NCCALCSIZE:
866  case WM_STYLECHANGING:
867  case WM_STYLECHANGED:
868  case WM_SIZE:
869  RECORD_MESSAGE(iwnd, message, SENT, wParam, 0);
870  break;
872  case WM_WINDOWPOSCHANGED:
873  ok(wParam == 0,"expected wParam=0\n");
874  RECORD_MESSAGE(iwnd, message, SENT, ((WINDOWPOS*)lParam)->flags, 0);
875  break;
876  default:
877  RECORD_MESSAGE(iwnd, message, SENT, 0, 0);
878  break;
879  }
881  RECORD_MESSAGE(iwnd, message, SENT_RET, 0, 0);
882  return lRet;
883 }
884 
885 
887 {
888  { 1, WM_GETMINMAXINFO, SENT },
889  { 1, WM_GETMINMAXINFO, SENT_RET },
890  { 1, WM_NCCREATE, SENT },
891  { 1, WM_NCCREATE, SENT_RET },
892  { 1, WM_NCCALCSIZE, SENT },
893  { 1, WM_NCCALCSIZE, SENT_RET },
894  { 1, WM_CREATE, SENT },
895  { 1, WM_PARENTNOTIFY, SENT },
896  { 1, WM_PARENTNOTIFY, SENT_RET },
897  { 2, WM_GETMINMAXINFO, SENT },
898  { 2, WM_GETMINMAXINFO, SENT_RET },
899  { 2, WM_NCCREATE, SENT },
900  { 2, WM_NCCREATE, SENT_RET },
901  { 2, WM_NCCALCSIZE, SENT },
902  { 2, WM_NCCALCSIZE, SENT_RET },
903  { 2, WM_CREATE, SENT },
904  { 2, WM_CREATE, SENT_RET },
905  { 2, WM_SIZE, SENT },
906  { 2, WM_SIZE, SENT_RET },
907  { 2, WM_MOVE, SENT },
908  { 2, WM_MOVE, SENT_RET },
909  { 2, WM_GETMINMAXINFO, SENT },
910  { 2, WM_GETMINMAXINFO, SENT_RET },
912  { 2, WM_GETMINMAXINFO, SENT },
913  { 2, WM_GETMINMAXINFO, SENT_RET },
915  { 2, WM_NCCALCSIZE, SENT, 1 },
916  { 2, WM_NCCALCSIZE, SENT_RET },
918  { 2, WM_MOVE, SENT },
919  { 2, WM_MOVE, SENT_RET },
920  { 2, WM_SIZE, SENT, SIZE_MAXIMIZED },
923  { 1, WM_NCCALCSIZE, SENT, TRUE },
924  { 1, WM_NCCALCSIZE, SENT_RET },
927  { 2, WM_SIZE, SENT_RET },
929  { 2, WM_NCCALCSIZE, SENT, TRUE },
930  { 2, WM_NCCALCSIZE, SENT_RET },
931  { 2, WM_SHOWWINDOW, SENT },
932  { 2, WM_SHOWWINDOW, SENT_RET },
935  { 2, WM_CHILDACTIVATE, SENT },
938  { 2, WM_MDIACTIVATE, SENT },
939  { 2, WM_MDIACTIVATE, SENT_RET },
940  { 2, WM_CHILDACTIVATE, SENT_RET },
943  { 1, WM_NCCALCSIZE, SENT, TRUE },
944  { 1, WM_NCCALCSIZE, SENT_RET },
947  { 1, WM_CREATE, SENT_RET },
948  { 0, 0 },
949 };
950 
952 {
953  { 1, WM_GETMINMAXINFO, SENT },
954  { 1, WM_GETMINMAXINFO, SENT_RET },
955  { 1, WM_NCCREATE, SENT },
956  { 1, WM_NCCREATE, SENT_RET },
957  { 1, WM_NCCALCSIZE, SENT },
958  { 1, WM_NCCALCSIZE, SENT_RET },
959  { 1, WM_CREATE, SENT },
960  { 1, WM_PARENTNOTIFY, SENT },
961  { 1, WM_PARENTNOTIFY, SENT_RET },
962  { 2, WM_GETMINMAXINFO, SENT },
963  { 2, WM_GETMINMAXINFO, SENT_RET },
964  { 2, WM_NCCREATE, SENT },
965  { 2, WM_NCCREATE, SENT_RET },
966  { 2, WM_NCCALCSIZE, SENT },
967  { 2, WM_NCCALCSIZE, SENT_RET },
968  { 2, WM_CREATE, SENT },
969  { 2, WM_CREATE, SENT_RET },
970  { 2, WM_SIZE, SENT },
971  { 2, WM_SIZE, SENT_RET },
972  { 2, WM_MOVE, SENT },
973  { 2, WM_MOVE, SENT_RET },
974  { 2, WM_GETMINMAXINFO, SENT },
975  { 2, WM_GETMINMAXINFO, SENT_RET },
977  { 2, WM_GETMINMAXINFO, SENT },
978  { 2, WM_GETMINMAXINFO, SENT_RET },
980  { 2, WM_NCCALCSIZE, SENT, 1 },
981  { 2, WM_NCCALCSIZE, SENT_RET },
983  { 2, WM_MOVE, SENT },
984  { 2, WM_MOVE, SENT_RET },
985  { 2, WM_SIZE, SENT, SIZE_MAXIMIZED },
988  { 1, WM_NCCALCSIZE, SENT, TRUE },
989  { 1, WM_NCCALCSIZE, SENT_RET },
992  { 2, WM_SIZE, SENT_RET },
994  //{ 2, WM_NCCALCSIZE, SENT, TRUE },
995  //{ 2, WM_NCCALCSIZE, SENT_RET },
996  { 2, WM_SHOWWINDOW, SENT },
997  { 2, WM_SHOWWINDOW, SENT_RET },
1000  { 2, WM_CHILDACTIVATE, SENT },
1003  { 2, WM_MDIACTIVATE, SENT },
1004  { 2, WM_MDIACTIVATE, SENT_RET },
1005  { 2, WM_CHILDACTIVATE, SENT_RET },
1008  { 1, WM_NCCALCSIZE, SENT, TRUE },
1009  { 1, WM_NCCALCSIZE, SENT_RET },
1011  { 1, WM_WINDOWPOSCHANGED, SENT_RET },
1012  { 1, WM_CREATE, SENT_RET },
1013  { 0, 0 },
1014 };
1015 
1017 {
1018  { 1, WM_GETMINMAXINFO, SENT },
1019  { 1, WM_GETMINMAXINFO, SENT_RET },
1020  { 1, WM_NCCREATE, SENT },
1021  { 1, WM_NCCREATE, SENT_RET },
1022  { 1, WM_NCCALCSIZE, SENT },
1023  { 1, WM_NCCALCSIZE, SENT_RET },
1024  { 1, WM_CREATE, SENT },
1025  { 1, WM_PARENTNOTIFY, SENT },
1026  { 1, WM_PARENTNOTIFY, SENT_RET },
1027  { 2, WM_GETMINMAXINFO, SENT },
1028  { 2, WM_GETMINMAXINFO, SENT_RET },
1029  { 2, WM_NCCREATE, SENT },
1030  { 2, WM_NCCREATE, SENT_RET },
1031  { 2, WM_NCCALCSIZE, SENT },
1032  { 2, WM_NCCALCSIZE, SENT_RET },
1033  { 2, WM_CREATE, SENT },
1034  { 2, WM_CREATE, SENT_RET },
1035  { 2, WM_SIZE, SENT },
1036  { 2, WM_SIZE, SENT_RET },
1037  { 2, WM_MOVE, SENT },
1038  { 2, WM_MOVE, SENT_RET },
1039  { 2, WM_GETMINMAXINFO, SENT },
1040  { 2, WM_GETMINMAXINFO, SENT_RET },
1042  { 2, WM_GETMINMAXINFO, SENT },
1043  { 2, WM_GETMINMAXINFO, SENT_RET },
1045  { 2, WM_NCCALCSIZE, SENT, 1 },
1046  { 2, WM_NCCALCSIZE, SENT_RET },
1048  { 2, WM_MOVE, SENT },
1049  { 2, WM_MOVE, SENT_RET },
1050  { 2, WM_SIZE, SENT, SIZE_MAXIMIZED },
1053  { 1, WM_NCCALCSIZE, SENT, TRUE },
1054  { 1, WM_NCCALCSIZE, SENT_RET },
1056  { 1, WM_WINDOWPOSCHANGED, SENT_RET },
1057  // +
1058  { 1, WM_NCCALCSIZE, SENT, TRUE },
1059  { 1, WM_NCCALCSIZE, SENT_RET },
1060  // -
1061  { 2, WM_SIZE, SENT_RET },
1062  { 2, WM_WINDOWPOSCHANGED, SENT_RET },
1063  { 2, WM_NCCALCSIZE, SENT, TRUE },
1064  { 2, WM_NCCALCSIZE, SENT_RET },
1065  { 2, WM_SHOWWINDOW, SENT },
1066  { 2, WM_SHOWWINDOW, SENT_RET },
1069  { 2, WM_CHILDACTIVATE, SENT },
1072  { 2, WM_MDIACTIVATE, SENT },
1073  { 2, WM_MDIACTIVATE, SENT_RET },
1074  { 2, WM_CHILDACTIVATE, SENT_RET },
1077  { 1, WM_NCCALCSIZE, SENT, TRUE },
1078  { 1, WM_NCCALCSIZE, SENT_RET },
1080  { 1, WM_WINDOWPOSCHANGED, SENT_RET },
1081  { 1, WM_CREATE, SENT_RET },
1082  { 0, 0 },
1083 };
1084 
1085 static void Test_Messages_MDI_Child(void)
1086 {
1087  HWND hWnd;
1088 
1089  BOOL Below8 = !IsWindows8OrGreater();
1090  BOOL Below8NonServer = !IsWindows8OrGreater() && !IsWindowsServer();
1091 
1092  RegisterSimpleClass(MSGTestProcMDI2, L"Test_Message_MDI_Window_X2");
1093  RegisterSimpleClass(MSGChildProcMDI2, L"Test_Message_MDI_Window_Child2");
1094 
1099  g_FaultLine = __LINE__ + 1;
1100  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_MDI_Window_X2", L"", 0, 10, 20,
1101  200, 210, NULL, NULL, 0, NULL);
1102 
1103  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
1107  EMPTY_CACHE();
1108 
1113  g_FaultLine = __LINE__ + 1;
1114  hWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Test_Message_MDI_Window_X2", L"", WS_OVERLAPPEDWINDOW, 10, 20,
1115  200, 210, NULL, NULL, 0, NULL);
1116 
1117  ok(hWnd == g_TestWindow, "We are testing with %p instead of %p\n", g_TestWindow, hWnd);
1121  EMPTY_CACHE();
1122 
1123  UnregisterClassW(L"Test_Message_Window_X2", NULL);
1124  UnregisterClassW(L"Test_Message_MDI_Window_Child2", NULL);
1125 }
1126 
1127 
1129 {
1130  Test_Params();
1131  Test_Messages();
1135 }
#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
#define TRUE
Definition: types.h:120
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
ULONG dwMajorVersion
Definition: rtltypes.h:234
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
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:27
HWND hWnd
Definition: settings.c:17
#define HIBYTE(W)
Definition: jmemdos.c:486
DWORD g_NcExpectExStyle
HANDLE HWND
Definition: compat.h:13
#define WM_SHOWWINDOW
Definition: winuser.h:1610
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#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 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:417
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:235
#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:99
#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