From: Thomas Faber Date: Mon, 26 Oct 2015 12:12:01 +0000 (+0000) Subject: [USER32_APITEST] X-Git-Tag: ReactOS-0.4.0~345 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=dde60eb9ef197eda4e8d7ae4bc4532b60ff4791b [USER32_APITEST] - Add some tests for other WS_CHILD/WS_POPUP combinations svn path=/trunk/; revision=69710 --- diff --git a/rostests/apitests/user32/CreateWindowEx.c b/rostests/apitests/user32/CreateWindowEx.c index d708e3aac4c..9c93df799ce 100644 --- a/rostests/apitests/user32/CreateWindowEx.c +++ b/rostests/apitests/user32/CreateWindowEx.c @@ -14,6 +14,19 @@ START_TEST(CreateWindowEx) HWND hWnd; 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(); @@ -25,4 +38,30 @@ START_TEST(CreateWindowEx) 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); }