Author: tfaber Date: Mon Oct 26 12:12:01 2015 New Revision: 69710
URL: http://svn.reactos.org/svn/reactos?rev=69710&view=rev Log: [USER32_APITEST] - Add some tests for other WS_CHILD/WS_POPUP combinations
Modified: trunk/rostests/apitests/user32/CreateWindowEx.c
Modified: trunk/rostests/apitests/user32/CreateWindowEx.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/CreateWind... ============================================================================== --- trunk/rostests/apitests/user32/CreateWindowEx.c [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/CreateWindowEx.c [iso-8859-1] Mon Oct 26 12:12:01 2015 @@ -15,6 +15,19 @@ DWORD dwError;
SetLastError(0x1234); + hWnd = CreateWindowExW(0, L"BUTTON", NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL); + dwError = GetLastError(); + ok(hWnd != NULL, "hWnd = %p\n", hWnd); + ok(dwError == 0, "error = %lu\n", dwError); + DestroyWindow(hWnd); + + SetLastError(0x1234); + hWnd = CreateWindowExW(0, L"BUTTON", NULL, 0, 0, 0, 0, 0, (HWND)(LONG_PTR)-1, NULL, NULL, NULL); + dwError = GetLastError(); + ok(hWnd == NULL, "hWnd = %p\n", hWnd); + ok(dwError == ERROR_INVALID_WINDOW_HANDLE, "error = %lu\n", dwError); + + SetLastError(0x1234); hWnd = CreateWindowExW(0, L"BUTTON", NULL, WS_CHILD, 0, 0, 0, 0, NULL, NULL, NULL, NULL); dwError = GetLastError(); ok(hWnd == NULL, "hWnd = %p\n", hWnd); @@ -25,4 +38,30 @@ dwError = GetLastError(); ok(hWnd == NULL, "hWnd = %p\n", hWnd); ok(dwError == ERROR_INVALID_WINDOW_HANDLE, "error = %lu\n", dwError); + + SetLastError(0x1234); + hWnd = CreateWindowExW(0, L"BUTTON", NULL, WS_POPUP, 0, 0, 0, 0, NULL, NULL, NULL, NULL); + dwError = GetLastError(); + ok(hWnd != NULL, "hWnd = %p\n", hWnd); + ok(dwError == 0, "error = %lu\n", dwError); + DestroyWindow(hWnd); + + SetLastError(0x1234); + hWnd = CreateWindowExW(0, L"BUTTON", NULL, WS_POPUP, 0, 0, 0, 0, (HWND)(LONG_PTR)-1, NULL, NULL, NULL); + dwError = GetLastError(); + ok(hWnd == NULL, "hWnd = %p\n", hWnd); + ok(dwError == ERROR_INVALID_WINDOW_HANDLE, "error = %lu\n", dwError); + + SetLastError(0x1234); + hWnd = CreateWindowExW(0, L"BUTTON", NULL, WS_CHILD|WS_POPUP, 0, 0, 0, 0, NULL, NULL, NULL, NULL); + dwError = GetLastError(); + ok(hWnd != NULL, "hWnd = %p\n", hWnd); + ok(dwError == 0, "error = %lu\n", dwError); + DestroyWindow(hWnd); + + SetLastError(0x1234); + hWnd = CreateWindowExW(0, L"BUTTON", NULL, WS_CHILD|WS_POPUP, 0, 0, 0, 0, (HWND)(LONG_PTR)-1, NULL, NULL, NULL); + dwError = GetLastError(); + ok(hWnd == NULL, "hWnd = %p\n", hWnd); + ok(dwError == ERROR_INVALID_WINDOW_HANDLE, "error = %lu\n", dwError); }