ReactOS  0.4.15-dev-1377-ga59cecd
CreateWindowEx.c File Reference
#include "precomp.h"
Include dependency graph for CreateWindowEx.c:

Go to the source code of this file.

Macros

#define ok_hex_(expression, result)
 

Functions

static void Test_Params (void)
 
static int get_iwnd (HWND hWnd)
 
static LRESULT CALLBACK MSGTestProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static BOOL IsWindowsServer ()
 
static BOOL IsWindows8OrGreater ()
 
static void Test_Messages (void)
 
static LRESULT CALLBACK MSGChildProc2 (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static LRESULT CALLBACK MSGTestProc2 (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static void Test_Messages_Child (void)
 
static LRESULT CALLBACK MSGTestProcMDI (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static void Test_Messages_MDI (void)
 
static LRESULT CALLBACK MSGTestProcMDI2 (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static LRESULT CALLBACK MSGChildProcMDI2 (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static void Test_Messages_MDI_Child (void)
 
 START_TEST (CreateWindowEx)
 

Variables

HWND g_TestWindow = NULL
 
HWND g_ChildWindow = NULL
 
HWND g_hwndMDIClient = NULL
 
DWORD g_FaultLine = 0
 
DWORD g_NcExpectStyle = 0
 
DWORD g_NcExpectExStyle = 0
 
DWORD g_ExpectStyle = 0
 
DWORD g_ExpectExStyle = 0
 
DWORD g_ChildNcExpectStyle = 0
 
DWORD g_ChildNcExpectExStyle = 0
 
DWORD g_ChildExpectStyle = 0
 
DWORD g_ChildExpectExStyle = 0
 
static int g_ChangeStyle = 0
 
MSG_ENTRY create_chain []
 
MSG_ENTRY create_chain_modify []
 
MSG_ENTRY create_chain_modify_below8_nonsrv []
 
MSG_ENTRY child_create_chain []
 
MSG_ENTRY child_create_chain_modify []
 
MSG_ENTRY child_create_chain_modify_below8_nonsrv []
 
MSG_ENTRY create_chain_MDI []
 
MSG_ENTRY child_create_chain_MDI []
 
MSG_ENTRY child_create_chain_MDI_below8 []
 
MSG_ENTRY child_create_chain_MDI_below8_nonsrv []
 

Macro Definition Documentation

◆ ok_hex_

#define ok_hex_ (   expression,
  result 
)
Value:
do { \
int _value = (expression); \
ok_(__FILE__, g_FaultLine)(_value == (result), "Wrong value for '%s', expected: " #result " (0x%x), got: 0x%x\n", \
#expression, (int)(result), _value); \
} while (0)
GLuint64EXT * result
Definition: glext.h:11304
DWORD g_FaultLine

Definition at line 98 of file CreateWindowEx.c.

Function Documentation

◆ get_iwnd()

static int get_iwnd ( HWND  hWnd)
static

Definition at line 72 of file CreateWindowEx.c.

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 }
HWND hWnd
Definition: settings.c:17
HWND g_TestWindow
HWND g_ChildWindow

Referenced by MSGChildProc2(), MSGChildProcMDI2(), MSGTestProc(), MSGTestProc2(), MSGTestProcMDI(), and MSGTestProcMDI2().

◆ IsWindows8OrGreater()

static BOOL IsWindows8OrGreater ( )
static

Definition at line 258 of file CreateWindowEx.c.

259 {
260  OSVERSIONINFOEXW osvi = { sizeof(osvi), 0, 0, 0, 0, {0}, 0, 0 };
261  DWORDLONG const dwlConditionMask = VerSetConditionMask(VerSetConditionMask(
265 
268 
270 }
#define VER_MINORVERSION
Definition: rtltypes.h:226
ULONG dwMajorVersion
Definition: rtltypes.h:238
ULONGLONG NTAPI VerSetConditionMask(IN ULONGLONG ConditionMask, IN ULONG TypeMask, IN UCHAR Condition)
Definition: version.c:262
OSVERSIONINFO osvi
Definition: ver.c:28
#define LOBYTE(W)
Definition: jmemdos.c:487
#define HIBYTE(W)
Definition: jmemdos.c:486
#define FALSE
Definition: types.h:117
#define _WIN32_WINNT_WIN8
Definition: sdkddkver.h:29
BOOL WINAPI VerifyVersionInfoW(IN LPOSVERSIONINFOEXW lpVersionInformation, IN DWORD dwTypeMask, IN DWORDLONG dwlConditionMask)
Definition: version.c:118
#define VER_MAJORVERSION
Definition: rtltypes.h:227
#define VER_SERVICEPACKMAJOR
Definition: rtltypes.h:231
ULONG dwMinorVersion
Definition: rtltypes.h:239
#define VER_GREATER_EQUAL
Definition: rtltypes.h:239
unsigned long long DWORDLONG
Definition: intsafe.h:91

Referenced by Test_Messages(), Test_Messages_Child(), and Test_Messages_MDI_Child().

◆ IsWindowsServer()

static BOOL IsWindowsServer ( )
static

Definition at line 248 of file CreateWindowEx.c.

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 }
#define VER_NT_WORKSTATION
ULONGLONG NTAPI VerSetConditionMask(IN ULONGLONG ConditionMask, IN ULONG TypeMask, IN UCHAR Condition)
Definition: version.c:262
OSVERSIONINFO osvi
Definition: ver.c:28
#define VER_PRODUCT_TYPE
Definition: rtltypes.h:233
BOOL WINAPI VerifyVersionInfoW(IN LPOSVERSIONINFOEXW lpVersionInformation, IN DWORD dwTypeMask, IN DWORDLONG dwlConditionMask)
Definition: version.c:118
#define VER_EQUAL
Definition: rtltypes.h:237
unsigned long long DWORDLONG
Definition: intsafe.h:91

Referenced by Test_Messages(), Test_Messages_Child(), and Test_Messages_MDI_Child().

◆ MSGChildProc2()

static LRESULT CALLBACK MSGChildProc2 ( HWND  hWnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 335 of file CreateWindowEx.c.

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 }
#define WM_IME_NOTIFY
Definition: winuser.h:1812
#define SWP_DRAWFRAME
Definition: winuser.h:1224
Definition: tftpd.h:59
#define WM_NCCALCSIZE
Definition: winuser.h:1667
#define ok_hex_(expression, result)
#define WM_GETTEXT
Definition: winuser.h:1600
HWND hWnd
Definition: settings.c:17
#define GWL_EXSTYLE
Definition: winuser.h:845
#define SetWindowLong
Definition: winuser.h:5828
#define SWP_NOZORDER
Definition: winuser.h:1232
CREATESTRUCTA * LPCREATESTRUCT
Definition: winuser.h:5701
#define WM_NCCREATE
Definition: winuser.h:1665
WPARAM wParam
Definition: combotst.c:138
static BOOL IseKeyMsg(UINT msg)
Definition: msgtrace.h:52
DWORD g_ChildNcExpectStyle
static int g_ChangeStyle
DWORD g_ChildExpectStyle
DWORD g_ChildNcExpectExStyle
#define DefWindowProc
Definition: ros2win.h:31
#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
HWND g_TestWindow
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD g_ChildExpectExStyle
GLbitfield flags
Definition: glext.h:7161
#define GetWindowLong
Definition: winuser.h:5771
#define WM_USER
Definition: winuser.h:1877
#define SWP_NOSIZE
Definition: winuser.h:1230
static BOOL IsDWmMsg(UINT msg)
Definition: msgtrace.h:39
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
Definition: msgtrace.h:6
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1644
#define WM_CREATE
Definition: winuser.h:1590
#define RECORD_MESSAGE(...)
Definition: msgtrace.h:60
#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)
LONG_PTR LRESULT
Definition: windef.h:209
static const struct access_res create[16]
Definition: package.c:7720
static int get_iwnd(HWND hWnd)
LPARAM lParam
Definition: combotst.c:139

Referenced by Test_Messages_Child().

◆ MSGChildProcMDI2()

static LRESULT CALLBACK MSGChildProcMDI2 ( HWND  hWnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 834 of file CreateWindowEx.c.

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 }
#define WM_IME_NOTIFY
Definition: winuser.h:1812
Definition: tftpd.h:59
#define WM_NCCALCSIZE
Definition: winuser.h:1667
#define ok_hex_(expression, result)
#define WM_GETTEXT
Definition: winuser.h:1600
HWND hWnd
Definition: settings.c:17
CREATESTRUCTA * LPCREATESTRUCT
Definition: winuser.h:5701
#define WM_NCCREATE
Definition: winuser.h:1665
WPARAM wParam
Definition: combotst.c:138
static BOOL IseKeyMsg(UINT msg)
Definition: msgtrace.h:52
DWORD g_ChildNcExpectStyle
DWORD g_ChildExpectStyle
#define DefMDIChildProc
Definition: ros2win.h:33
DWORD g_ChildNcExpectExStyle
#define WM_SIZE
Definition: winuser.h:1593
#define WM_IME_SETCONTEXT
Definition: winuser.h:1811
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1643
DWORD g_ChildExpectExStyle
GLbitfield flags
Definition: glext.h:7161
#define WM_USER
Definition: winuser.h:1877
static BOOL IsDWmMsg(UINT msg)
Definition: msgtrace.h:39
#define ok(value,...)
Definition: atltest.h:57
Definition: msgtrace.h:6
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1644
#define WM_CREATE
Definition: winuser.h:1590
#define RECORD_MESSAGE(...)
Definition: msgtrace.h:60
LONG_PTR LRESULT
Definition: windef.h:209
static const struct access_res create[16]
Definition: package.c:7720
static int get_iwnd(HWND hWnd)
LPARAM lParam
Definition: combotst.c:139

Referenced by Test_Messages_MDI_Child().

◆ MSGTestProc()

static LRESULT CALLBACK MSGTestProc ( HWND  hWnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 108 of file CreateWindowEx.c.

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 }
#define WM_IME_NOTIFY
Definition: winuser.h:1812
#define SWP_DRAWFRAME
Definition: winuser.h:1224
Definition: tftpd.h:59
DWORD g_NcExpectStyle
DWORD g_ExpectExStyle
#define WM_NCCALCSIZE
Definition: winuser.h:1667
#define ok_hex_(expression, result)
#define WM_GETTEXT
Definition: winuser.h:1600
HWND hWnd
Definition: settings.c:17
DWORD g_NcExpectExStyle
#define GWL_EXSTYLE
Definition: winuser.h:845
#define SetWindowLong
Definition: winuser.h:5828
#define SWP_NOZORDER
Definition: winuser.h:1232
CREATESTRUCTA * LPCREATESTRUCT
Definition: winuser.h:5701
#define WM_NCCREATE
Definition: winuser.h:1665
WPARAM wParam
Definition: combotst.c:138
static BOOL IseKeyMsg(UINT msg)
Definition: msgtrace.h:52
static int g_ChangeStyle
#define DefWindowProc
Definition: ros2win.h:31
#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
DWORD g_ExpectStyle
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
#define GetWindowLong
Definition: winuser.h:5771
#define WM_USER
Definition: winuser.h:1877
#define SWP_NOSIZE
Definition: winuser.h:1230
static BOOL IsDWmMsg(UINT msg)
Definition: msgtrace.h:39
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
Definition: msgtrace.h:6
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1644
#define WM_CREATE
Definition: winuser.h:1590
#define RECORD_MESSAGE(...)
Definition: msgtrace.h:60
#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)
LONG_PTR LRESULT
Definition: windef.h:209
static const struct access_res create[16]
Definition: package.c:7720
static int get_iwnd(HWND hWnd)
LPARAM lParam
Definition: combotst.c:139

Referenced by Test_Messages().

◆ MSGTestProc2()

static LRESULT CALLBACK MSGTestProc2 ( HWND  hWnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 402 of file CreateWindowEx.c.

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 }
#define WM_IME_NOTIFY
Definition: winuser.h:1812
Definition: tftpd.h:59
DWORD g_NcExpectStyle
DWORD g_ExpectExStyle
#define WM_NCCALCSIZE
Definition: winuser.h:1667
#define ok_hex_(expression, result)
#define WM_GETTEXT
Definition: winuser.h:1600
HWND hWnd
Definition: settings.c:17
DWORD g_NcExpectExStyle
#define WS_CHILD
Definition: pedump.c:617
CREATESTRUCTA * LPCREATESTRUCT
Definition: winuser.h:5701
#define WM_NCCREATE
Definition: winuser.h:1665
BOOL WINAPI DestroyWindow(_In_ HWND)
static HWND child
Definition: cursoricon.c:298
WPARAM wParam
Definition: combotst.c:138
DWORD g_FaultLine
static BOOL IseKeyMsg(UINT msg)
Definition: msgtrace.h:52
#define DefWindowProc
Definition: ros2win.h:31
#define WM_SIZE
Definition: winuser.h:1593
#define WM_IME_SETCONTEXT
Definition: winuser.h:1811
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1643
#define WM_NCDESTROY
Definition: winuser.h:1666
DWORD g_ExpectStyle
GLbitfield flags
Definition: glext.h:7161
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 WM_USER
Definition: winuser.h:1877
static BOOL IsDWmMsg(UINT msg)
Definition: msgtrace.h:39
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
Definition: msgtrace.h:6
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1644
#define WM_CREATE
Definition: winuser.h:1590
#define RECORD_MESSAGE(...)
Definition: msgtrace.h:60
HWND g_ChildWindow
LONG_PTR LRESULT
Definition: windef.h:209
static const struct access_res create[16]
Definition: package.c:7720
static int get_iwnd(HWND hWnd)
LPARAM lParam
Definition: combotst.c:139
#define ok_(x1, x2)
Definition: atltest.h:61

Referenced by Test_Messages_Child().

◆ MSGTestProcMDI()

static LRESULT CALLBACK MSGTestProcMDI ( HWND  hWnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 652 of file CreateWindowEx.c.

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 }
#define WM_IME_NOTIFY
Definition: winuser.h:1812
Definition: tftpd.h:59
DWORD g_NcExpectStyle
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
DWORD g_ExpectExStyle
#define CreateWindow
Definition: winuser.h:5729
#define WM_NCCALCSIZE
Definition: winuser.h:1667
#define ok_hex_(expression, result)
#define WM_GETTEXT
Definition: winuser.h:1600
HWND hWnd
Definition: settings.c:17
DWORD g_NcExpectExStyle
#define WS_CHILD
Definition: pedump.c:617
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
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
WPARAM wParam
Definition: combotst.c:138
static BOOL IseKeyMsg(UINT msg)
Definition: msgtrace.h:52
HWND g_hwndMDIClient
#define SW_SHOW
Definition: winuser.h:769
#define DefWindowProc
Definition: ros2win.h:31
#define WM_SIZE
Definition: winuser.h:1593
#define WM_IME_SETCONTEXT
Definition: winuser.h:1811
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1643
DWORD g_ExpectStyle
#define WS_HSCROLL
Definition: pedump.c:628
GLbitfield flags
Definition: glext.h:7161
#define WM_USER
Definition: winuser.h:1877
static BOOL IsDWmMsg(UINT msg)
Definition: msgtrace.h:39
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
#define WS_VSCROLL
Definition: pedump.c:627
Definition: msgtrace.h:6
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1644
#define WM_CREATE
Definition: winuser.h:1590
#define RECORD_MESSAGE(...)
Definition: msgtrace.h:60
LONG_PTR LRESULT
Definition: windef.h:209
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

Referenced by Test_Messages_MDI().

◆ MSGTestProcMDI2()

static LRESULT CALLBACK MSGTestProcMDI2 ( HWND  hWnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 761 of file CreateWindowEx.c.

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 }
#define WM_IME_NOTIFY
Definition: winuser.h:1812
Definition: tftpd.h:59
DWORD g_NcExpectStyle
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
DWORD g_ExpectExStyle
#define CreateWindow
Definition: winuser.h:5729
#define WM_NCCALCSIZE
Definition: winuser.h:1667
#define ok_hex_(expression, result)
#define WM_GETTEXT
Definition: winuser.h:1600
HWND hWnd
Definition: settings.c:17
DWORD g_NcExpectExStyle
HANDLE HWND
Definition: compat.h:19
#define WS_CHILD
Definition: pedump.c:617
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
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
WPARAM wParam
Definition: combotst.c:138
static BOOL IseKeyMsg(UINT msg)
Definition: msgtrace.h:52
#define CW_USEDEFAULT
Definition: winuser.h:225
HWND g_hwndMDIClient
LONG_PTR LPARAM
Definition: windef.h:208
#define SW_SHOW
Definition: winuser.h:769
#define DefWindowProc
Definition: ros2win.h:31
#define WM_SIZE
Definition: winuser.h:1593
#define WM_IME_SETCONTEXT
Definition: winuser.h:1811
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1643
DWORD g_ExpectStyle
#define WS_HSCROLL
Definition: pedump.c:628
GLbitfield flags
Definition: glext.h:7161
#define WM_USER
Definition: winuser.h:1877
static BOOL IsDWmMsg(UINT msg)
Definition: msgtrace.h:39
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
#define WS_VSCROLL
Definition: pedump.c:627
Definition: msgtrace.h:6
#define WM_MDICREATE
Definition: winuser.h:1794
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1644
#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
HWND g_ChildWindow
LONG_PTR LRESULT
Definition: windef.h:209
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 WS_MAXIMIZE
Definition: pedump.c:623

Referenced by Test_Messages_MDI_Child().

◆ START_TEST()

START_TEST ( CreateWindowEx  )

Definition at line 1129 of file CreateWindowEx.c.

1130 {
1131  Test_Params();
1132  Test_Messages();
1136 }
static void Test_Params(void)
static void Test_Messages_MDI_Child(void)
static void Test_Messages_Child(void)
static void Test_Messages_MDI(void)
static void Test_Messages(void)

◆ Test_Messages()

static void Test_Messages ( void  )
static

Definition at line 272 of file CreateWindowEx.c.

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 }
DWORD g_NcExpectStyle
DWORD g_ExpectExStyle
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
MSG_ENTRY create_chain[]
HWND hWnd
Definition: settings.c:17
DWORD g_NcExpectExStyle
BOOL WINAPI DestroyWindow(_In_ HWND)
static BOOL IsWindowsServer()
DWORD g_FaultLine
unsigned int BOOL
Definition: ntddk_ex.h:94
MSG_ENTRY create_chain_modify_below8_nonsrv[]
static BOOL IsWindows8OrGreater()
static int g_ChangeStyle
static __inline ATOM RegisterSimpleClass(WNDPROC lpfnWndProc, LPCWSTR lpszClassName)
#define COMPARE_CACHE(msg_chain)
Definition: msgtrace.h:57
DWORD g_ExpectStyle
HWND g_TestWindow
static LRESULT CALLBACK MSGTestProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
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 EMPTY_CACHE()
Definition: msgtrace.h:59
#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
#define NULL
Definition: types.h:112
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
HWND g_ChildWindow

Referenced by START_TEST().

◆ Test_Messages_Child()

static void Test_Messages_Child ( void  )
static

Definition at line 578 of file CreateWindowEx.c.

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 }
DWORD g_NcExpectStyle
DWORD g_ExpectExStyle
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
HWND hWnd
Definition: settings.c:17
DWORD g_NcExpectExStyle
#define WS_CHILD
Definition: pedump.c:617
MSG_ENTRY child_create_chain_modify_below8_nonsrv[]
BOOL WINAPI DestroyWindow(_In_ HWND)
static BOOL IsWindowsServer()
DWORD g_FaultLine
unsigned int BOOL
Definition: ntddk_ex.h:94
DWORD g_ChildNcExpectStyle
static BOOL IsWindows8OrGreater()
static int g_ChangeStyle
DWORD g_ChildExpectStyle
DWORD g_ChildNcExpectExStyle
static __inline ATOM RegisterSimpleClass(WNDPROC lpfnWndProc, LPCWSTR lpszClassName)
MSG_ENTRY child_create_chain[]
#define COMPARE_CACHE(msg_chain)
Definition: msgtrace.h:57
DWORD g_ExpectStyle
HWND g_TestWindow
DWORD g_ChildExpectExStyle
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 EMPTY_CACHE()
Definition: msgtrace.h:59
MSG_ENTRY child_create_chain_modify[]
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
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
static LRESULT CALLBACK MSGTestProc2(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
HWND g_ChildWindow

Referenced by START_TEST().

◆ Test_Messages_MDI()

static void Test_Messages_MDI ( void  )
static

Definition at line 727 of file CreateWindowEx.c.

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 }
DWORD g_NcExpectStyle
DWORD g_ExpectExStyle
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
MSG_ENTRY create_chain_MDI[]
HWND hWnd
Definition: settings.c:17
DWORD g_NcExpectExStyle
BOOL WINAPI DestroyWindow(_In_ HWND)
DWORD g_FaultLine
HWND g_hwndMDIClient
static __inline ATOM RegisterSimpleClass(WNDPROC lpfnWndProc, LPCWSTR lpszClassName)
static LRESULT CALLBACK MSGTestProcMDI(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
#define COMPARE_CACHE(msg_chain)
Definition: msgtrace.h:57
DWORD g_ExpectStyle
HWND g_TestWindow
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 EMPTY_CACHE()
Definition: msgtrace.h:59
#define WS_EX_OVERLAPPEDWINDOW
Definition: winuser.h:398
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
HWND g_ChildWindow

Referenced by START_TEST().

◆ Test_Messages_MDI_Child()

static void Test_Messages_MDI_Child ( void  )
static

Definition at line 1086 of file CreateWindowEx.c.

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 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_EX_WINDOWEDGE
Definition: winuser.h:407
DWORD g_NcExpectStyle
DWORD g_ExpectExStyle
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
MSG_ENTRY child_create_chain_MDI[]
HWND hWnd
Definition: settings.c:17
DWORD g_NcExpectExStyle
#define WS_CHILD
Definition: pedump.c:617
BOOL WINAPI DestroyWindow(_In_ HWND)
static BOOL IsWindowsServer()
DWORD g_FaultLine
MSG_ENTRY child_create_chain_MDI_below8[]
#define WS_EX_MDICHILD
Definition: winuser.h:394
unsigned int BOOL
Definition: ntddk_ex.h:94
DWORD g_ChildNcExpectStyle
static BOOL IsWindows8OrGreater()
DWORD g_ChildExpectStyle
DWORD g_ChildNcExpectExStyle
MSG_ENTRY child_create_chain_MDI_below8_nonsrv[]
static __inline ATOM RegisterSimpleClass(WNDPROC lpfnWndProc, LPCWSTR lpszClassName)
static LRESULT CALLBACK MSGChildProcMDI2(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
#define COMPARE_CACHE(msg_chain)
Definition: msgtrace.h:57
DWORD g_ExpectStyle
HWND g_TestWindow
DWORD g_ChildExpectExStyle
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 EMPTY_CACHE()
Definition: msgtrace.h:59
#define WS_EX_OVERLAPPEDWINDOW
Definition: winuser.h:398
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
HWND g_ChildWindow
#define WS_VISIBLE
Definition: pedump.c:620
static LRESULT CALLBACK MSGTestProcMDI2(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
#define WS_MAXIMIZE
Definition: pedump.c:623

Referenced by START_TEST().

◆ Test_Params()

static void Test_Params ( void  )
static

Definition at line 11 of file CreateWindowEx.c.

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 }
HWND hWnd
Definition: settings.c:17
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
#define WS_CHILD
Definition: pedump.c:617
BOOL WINAPI DestroyWindow(_In_ HWND)
#define ERROR_TLW_WITH_WSCHILD
Definition: winerror.h:887
#define ERROR_INVALID_WINDOW_HANDLE
Definition: winerror.h:881
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:611
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 ok(value,...)
Definition: atltest.h:57
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define WS_POPUP
Definition: pedump.c:616
#define NULL
Definition: types.h:112

Referenced by START_TEST().

Variable Documentation

◆ child_create_chain

MSG_ENTRY child_create_chain[]
Initial value:
=
{
{ 1, WM_NCCREATE, SENT },
{ 2, WM_NCCREATE, SENT },
{ 2, WM_CREATE, SENT },
{ 2, WM_SIZE, SENT },
{ 2, WM_SIZE, SENT_RET },
{ 2, WM_MOVE, SENT },
{ 2, WM_MOVE, SENT_RET },
{ 1, WM_CREATE, SENT },
{ 0, 0 }
}
#define WM_NCCALCSIZE
Definition: winuser.h:1667
#define WM_MOVE
Definition: winuser.h:1592
#define WM_NCCREATE
Definition: winuser.h:1665
#define WM_PARENTNOTIFY
Definition: winuser.h:1785
#define WM_SIZE
Definition: winuser.h:1593
Definition: msgtrace.h:6
#define WM_CREATE
Definition: winuser.h:1590
#define WM_GETMINMAXINFO
Definition: winuser.h:1622

Definition at line 464 of file CreateWindowEx.c.

Referenced by Test_Messages_Child().

◆ child_create_chain_MDI

MSG_ENTRY child_create_chain_MDI[]

Definition at line 887 of file CreateWindowEx.c.

Referenced by Test_Messages_MDI_Child().

◆ child_create_chain_MDI_below8

MSG_ENTRY child_create_chain_MDI_below8[]

Definition at line 952 of file CreateWindowEx.c.

Referenced by Test_Messages_MDI_Child().

◆ child_create_chain_MDI_below8_nonsrv

MSG_ENTRY child_create_chain_MDI_below8_nonsrv[]

Definition at line 1017 of file CreateWindowEx.c.

Referenced by Test_Messages_MDI_Child().

◆ child_create_chain_modify

MSG_ENTRY child_create_chain_modify[]

Definition at line 490 of file CreateWindowEx.c.

Referenced by Test_Messages_Child().

◆ child_create_chain_modify_below8_nonsrv

MSG_ENTRY child_create_chain_modify_below8_nonsrv[]

Definition at line 532 of file CreateWindowEx.c.

Referenced by Test_Messages_Child().

◆ create_chain

MSG_ENTRY create_chain[]
Initial value:
=
{
{ 1, WM_NCCREATE, SENT },
{ 1, WM_CREATE, SENT },
{ 0, 0 }
}
#define WM_NCCALCSIZE
Definition: winuser.h:1667
#define WM_NCCREATE
Definition: winuser.h:1665
Definition: msgtrace.h:6
#define WM_CREATE
Definition: winuser.h:1590
#define WM_GETMINMAXINFO
Definition: winuser.h:1622

Definition at line 173 of file CreateWindowEx.c.

Referenced by Test_Messages().

◆ create_chain_MDI

MSG_ENTRY create_chain_MDI[]
Initial value:
=
{
{ 1, WM_NCCREATE, SENT },
{ 1, WM_CREATE, SENT },
{ 0, 0 }
}
#define WM_NCCALCSIZE
Definition: winuser.h:1667
#define WM_NCCREATE
Definition: winuser.h:1665
#define WM_PARENTNOTIFY
Definition: winuser.h:1785
Definition: msgtrace.h:6
#define WM_CREATE
Definition: winuser.h:1590
#define WM_GETMINMAXINFO
Definition: winuser.h:1622

Definition at line 712 of file CreateWindowEx.c.

Referenced by Test_Messages_MDI().

◆ create_chain_modify

MSG_ENTRY create_chain_modify[]
Initial value:
=
{
{ 1, WM_NCCREATE, SENT },
{ 1, WM_STYLECHANGING, SENT, GWL_EXSTYLE },
{ 1, WM_STYLECHANGING, SENT_RET },
{ 1, WM_STYLECHANGED, SENT, GWL_EXSTYLE },
{ 1, WM_STYLECHANGED, SENT_RET },
{ 1, WM_MOVE, SENT },
{ 1, WM_MOVE, SENT_RET },
{ 1, WM_SIZE, SENT },
{ 1, WM_SIZE, SENT_RET },
{ 1, WM_CREATE, SENT },
{ 0, 0 }
}
#define TRUE
Definition: types.h:120
#define WM_NCCALCSIZE
Definition: winuser.h:1667
#define WM_MOVE
Definition: winuser.h:1592
#define GWL_EXSTYLE
Definition: winuser.h:845
#define SWP_NOZORDER
Definition: winuser.h:1232
#define WM_NCCREATE
Definition: winuser.h:1665
#define WM_SIZE
Definition: winuser.h:1593
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1643
#define SWP_FRAMECHANGED
Definition: winuser.h:1225
#define SWP_NOSIZE
Definition: winuser.h:1230
#define SWP_NOREDRAW
Definition: winuser.h:1231
Definition: msgtrace.h:6
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1644
#define WM_CREATE
Definition: winuser.h:1590
#define SWP_NOMOVE
Definition: winuser.h:1229
#define WM_GETMINMAXINFO
Definition: winuser.h:1622

Definition at line 186 of file CreateWindowEx.c.

Referenced by Test_Messages().

◆ create_chain_modify_below8_nonsrv

MSG_ENTRY create_chain_modify_below8_nonsrv[]
Initial value:
=
{
{ 1, WM_NCCREATE, SENT },
{ 1, WM_STYLECHANGING, SENT, GWL_EXSTYLE },
{ 1, WM_STYLECHANGING, SENT_RET },
{ 1, WM_STYLECHANGED, SENT, GWL_EXSTYLE },
{ 1, WM_STYLECHANGED, SENT_RET },
{ 1, WM_MOVE, SENT },
{ 1, WM_MOVE, SENT_RET },
{ 1, WM_SIZE, SENT },
{ 1, WM_SIZE, SENT_RET },
{ 1, WM_CREATE, SENT },
{ 0, 0 }
}
#define TRUE
Definition: types.h:120
#define WM_NCCALCSIZE
Definition: winuser.h:1667
#define WM_MOVE
Definition: winuser.h:1592
#define GWL_EXSTYLE
Definition: winuser.h:845
#define SWP_NOZORDER
Definition: winuser.h:1232
#define WM_NCCREATE
Definition: winuser.h:1665
#define WM_SIZE
Definition: winuser.h:1593
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1643
#define SWP_FRAMECHANGED
Definition: winuser.h:1225
#define SWP_NOSIZE
Definition: winuser.h:1230
#define SWP_NOREDRAW
Definition: winuser.h:1231
Definition: msgtrace.h:6
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1644
#define WM_CREATE
Definition: winuser.h:1590
#define SWP_NOMOVE
Definition: winuser.h:1229
#define WM_GETMINMAXINFO
Definition: winuser.h:1622

Definition at line 215 of file CreateWindowEx.c.

Referenced by Test_Messages().

◆ g_ChangeStyle

int g_ChangeStyle = 0
static

Definition at line 107 of file CreateWindowEx.c.

Referenced by MSGChildProc2(), MSGTestProc(), Test_Messages(), and Test_Messages_Child().

◆ g_ChildExpectExStyle

DWORD g_ChildExpectExStyle = 0

◆ g_ChildExpectStyle

DWORD g_ChildExpectStyle = 0

◆ g_ChildNcExpectExStyle

DWORD g_ChildNcExpectExStyle = 0

◆ g_ChildNcExpectStyle

DWORD g_ChildNcExpectStyle = 0

◆ g_ChildWindow

◆ g_ExpectExStyle

◆ g_ExpectStyle

◆ g_FaultLine

◆ g_hwndMDIClient

HWND g_hwndMDIClient = NULL

Definition at line 70 of file CreateWindowEx.c.

Referenced by MSGTestProcMDI(), MSGTestProcMDI2(), and Test_Messages_MDI().

◆ g_NcExpectExStyle

◆ g_NcExpectStyle

◆ g_TestWindow