[USER32_APITEST]
[reactos.git] / rostests / apitests / user32 / CreateWindowEx.c
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 */
7
8 #include <apitest.h>
9 #include <winuser.h>
10
11
12 START_TEST(CreateWindowEx)
13 {
14 HWND hWnd;
15 DWORD dwError;
16
17 SetLastError(0x1234);
18 hWnd = CreateWindowExW(0, L"BUTTON", NULL, WS_CHILD, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
19 dwError = GetLastError();
20 ok(hWnd == NULL, "hWnd = %p\n", hWnd);
21 ok(dwError == ERROR_TLW_WITH_WSCHILD, "error = %lu\n", dwError);
22
23 SetLastError(0x1234);
24 hWnd = CreateWindowExW(0, L"BUTTON", NULL, WS_CHILD, 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 }