https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c39b0fc66706635a73fdb…
commit c39b0fc66706635a73fdbab557e1404e515fa622
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sat Dec 2 21:17:22 2017 +0100
[USER32_APITEST] Add a PCH.
---
modules/rostests/apitests/include/user32testhelpers.h | 2 ++
modules/rostests/apitests/user32/AttachThreadInput.c | 9 +--------
modules/rostests/apitests/user32/CMakeLists.txt | 6 +++---
modules/rostests/apitests/user32/CreateDialog.c | 7 +------
.../apitests/user32/CreateIconFromResourceEx.c | 7 ++-----
modules/rostests/apitests/user32/CreateWindowEx.c | 5 +----
modules/rostests/apitests/user32/DeferWindowPos.c | 7 +------
modules/rostests/apitests/user32/DestroyCursorIcon.c | 7 ++-----
modules/rostests/apitests/user32/DrawIconEx.c | 7 ++-----
modules/rostests/apitests/user32/EmptyClipboard.c | 8 +-------
modules/rostests/apitests/user32/EnumDisplaySettings.c | 4 +---
modules/rostests/apitests/user32/GetDCEx.c | 5 +----
modules/rostests/apitests/user32/GetIconInfo.c | 9 +--------
modules/rostests/apitests/user32/GetKeyState.c | 7 ++-----
modules/rostests/apitests/user32/GetPeekMessage.c | 4 +---
modules/rostests/apitests/user32/GetSystemMetrics.c | 6 +-----
.../apitests/user32/GetUserObjectInformation.c | 7 +++----
modules/rostests/apitests/user32/GetWindowPlacement.c | 3 +--
modules/rostests/apitests/user32/InitializeLpkHooks.c | 5 +----
modules/rostests/apitests/user32/LoadImage.c | 6 +-----
.../apitests/user32/LookupIconIdFromDirectoryEx.c | 9 ++-------
modules/rostests/apitests/user32/NextDlgItem.c | 6 +-----
modules/rostests/apitests/user32/RealGetWindowClass.c | 6 +-----
modules/rostests/apitests/user32/RegisterClassEx.c | 9 +--------
modules/rostests/apitests/user32/RegisterHotKey.c | 7 +------
modules/rostests/apitests/user32/ScrollDC.c | 6 +-----
modules/rostests/apitests/user32/ScrollWindowEx.c | 6 +-----
modules/rostests/apitests/user32/SendMessageTimeout.c | 6 +-----
modules/rostests/apitests/user32/SetActiveWindow.c | 9 +--------
modules/rostests/apitests/user32/SetCursorPos.c | 6 +-----
modules/rostests/apitests/user32/SetParent.c | 6 +-----
modules/rostests/apitests/user32/SetProp.c | 4 +---
modules/rostests/apitests/user32/SetScrollInfo.c | 5 +----
modules/rostests/apitests/user32/SetScrollRange.c | 5 +----
.../rostests/apitests/user32/SystemParametersInfo.c | 11 ++---------
modules/rostests/apitests/user32/TrackMouseEvent.c | 8 +-------
modules/rostests/apitests/user32/WndProc.c | 5 +----
modules/rostests/apitests/user32/desktop.c | 12 ++----------
modules/rostests/apitests/user32/precomp.h | 18 ++++++++++++++++++
39 files changed, 68 insertions(+), 197 deletions(-)
diff --git a/modules/rostests/apitests/include/user32testhelpers.h
b/modules/rostests/apitests/include/user32testhelpers.h
index 687af541a2..ef020ed429 100644
--- a/modules/rostests/apitests/include/user32testhelpers.h
+++ b/modules/rostests/apitests/include/user32testhelpers.h
@@ -1,4 +1,6 @@
+#pragma once
+
static __inline ATOM RegisterSimpleClass(WNDPROC lpfnWndProc, LPCWSTR lpszClassName)
{
WNDCLASSEXW wcex;
diff --git a/modules/rostests/apitests/user32/AttachThreadInput.c
b/modules/rostests/apitests/user32/AttachThreadInput.c
index 78b461d0c6..fbba717872 100644
--- a/modules/rostests/apitests/user32/AttachThreadInput.c
+++ b/modules/rostests/apitests/user32/AttachThreadInput.c
@@ -5,14 +5,7 @@
* PROGRAMMERS: Giannis Adamopoulos
*/
-#include <apitest.h>
-
-#include <wingdi.h>
-#include <winuser.h>
-#include <msgtrace.h>
-#include <user32testhelpers.h>
-
-#define DESKTOP_ALL_ACCESS 0x01ff
+#include "precomp.h"
typedef struct {
DWORD tid;
diff --git a/modules/rostests/apitests/user32/CMakeLists.txt
b/modules/rostests/apitests/user32/CMakeLists.txt
index 3b758836d4..5a0c2d1844 100644
--- a/modules/rostests/apitests/user32/CMakeLists.txt
+++ b/modules/rostests/apitests/user32/CMakeLists.txt
@@ -38,13 +38,13 @@ list(APPEND SOURCE
TrackMouseEvent.c
WndProc.c
wsprintf.c
- testlist.c
- user32_apitest.rc)
+ precomp.h)
-add_executable(user32_apitest ${SOURCE})
+add_executable(user32_apitest ${SOURCE} testlist.c user32_apitest.rc)
target_link_libraries(user32_apitest wine ${PSEH_LIB})
set_module_type(user32_apitest win32cui)
add_importlibs(user32_apitest advapi32 gdi32 user32 msvcrt kernel32 ntdll)
+add_pch(user32_apitest precomp.h SOURCE)
add_rostests_file(TARGET user32_apitest)
add_rostests_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/verclasstest1.manifest")
diff --git a/modules/rostests/apitests/user32/CreateDialog.c
b/modules/rostests/apitests/user32/CreateDialog.c
index dfb33a5c00..0d7d718cc0 100644
--- a/modules/rostests/apitests/user32/CreateDialog.c
+++ b/modules/rostests/apitests/user32/CreateDialog.c
@@ -5,12 +5,7 @@
* PROGRAMMERS: Andreas Maier
*/
-#include <stdarg.h>
-#include <stdio.h>
-#include <apitest.h>
-
-#include <wingdi.h>
-#include <winuser.h>
+#include "precomp.h"
#define TEST_MAX_MSG 50
diff --git a/modules/rostests/apitests/user32/CreateIconFromResourceEx.c
b/modules/rostests/apitests/user32/CreateIconFromResourceEx.c
index 4c5d7b7deb..25f75c42a7 100644
--- a/modules/rostests/apitests/user32/CreateIconFromResourceEx.c
+++ b/modules/rostests/apitests/user32/CreateIconFromResourceEx.c
@@ -1,8 +1,5 @@
-#include <apitest.h>
-
-#include <winuser.h>
-#include <wingdi.h>
+#include "precomp.h"
START_TEST(CreateIconFromResourceEx)
{
@@ -89,4 +86,4 @@ START_TEST(CreateIconFromResourceEx)
ok(hcur1 == NULL, "\n");
err = GetLastError();
ok(err == 0x0badf00d, "err: %lu\n", err);
-}
\ No newline at end of file
+}
diff --git a/modules/rostests/apitests/user32/CreateWindowEx.c
b/modules/rostests/apitests/user32/CreateWindowEx.c
index d377b3f0da..24ac64d26f 100644
--- a/modules/rostests/apitests/user32/CreateWindowEx.c
+++ b/modules/rostests/apitests/user32/CreateWindowEx.c
@@ -6,10 +6,7 @@
* Mark Jansen
*/
-#include <apitest.h>
-#include <winuser.h>
-#include <msgtrace.h>
-#include <user32testhelpers.h>
+#include "precomp.h"
static void Test_Params(void)
{
diff --git a/modules/rostests/apitests/user32/DeferWindowPos.c
b/modules/rostests/apitests/user32/DeferWindowPos.c
index 223d489496..ad18459cf4 100644
--- a/modules/rostests/apitests/user32/DeferWindowPos.c
+++ b/modules/rostests/apitests/user32/DeferWindowPos.c
@@ -5,12 +5,7 @@
* PROGRAMMERS: Thomas Faber <thomas.faber(a)reactos.org>
*/
-#include <apitest.h>
-
-#include <winuser.h>
-#include <undocuser.h>
-#include <msgtrace.h>
-#include <user32testhelpers.h>
+#include "precomp.h"
HWND hWnd1, hWnd2, hWnd3, hWnd4;
diff --git a/modules/rostests/apitests/user32/DestroyCursorIcon.c
b/modules/rostests/apitests/user32/DestroyCursorIcon.c
index df91a41e0d..da87d122f0 100644
--- a/modules/rostests/apitests/user32/DestroyCursorIcon.c
+++ b/modules/rostests/apitests/user32/DestroyCursorIcon.c
@@ -1,8 +1,5 @@
-#include <apitest.h>
-
-#include <wingdi.h>
-#include <winuser.h>
+#include "precomp.h"
START_TEST(DestroyCursorIcon)
{
@@ -51,4 +48,4 @@ START_TEST(DestroyCursorIcon)
/* clean up */
DeleteObject(iconinfo.hbmMask);
DeleteObject(iconinfo.hbmColor);
-}
\ No newline at end of file
+}
diff --git a/modules/rostests/apitests/user32/DrawIconEx.c
b/modules/rostests/apitests/user32/DrawIconEx.c
index b3a7cc354f..41b1707e03 100644
--- a/modules/rostests/apitests/user32/DrawIconEx.c
+++ b/modules/rostests/apitests/user32/DrawIconEx.c
@@ -1,8 +1,5 @@
-#include <apitest.h>
-
-#include <wingdi.h>
-#include <winuser.h>
+#include "precomp.h"
START_TEST(DrawIconEx)
{
@@ -55,4 +52,4 @@ START_TEST(DrawIconEx)
hbmp = SelectObject(hdc, hbmp);
DeleteObject(hbmp);
DeleteDC(hdc);
-}
\ No newline at end of file
+}
diff --git a/modules/rostests/apitests/user32/EmptyClipboard.c
b/modules/rostests/apitests/user32/EmptyClipboard.c
index a7d0140bd7..0536736902 100644
--- a/modules/rostests/apitests/user32/EmptyClipboard.c
+++ b/modules/rostests/apitests/user32/EmptyClipboard.c
@@ -5,13 +5,7 @@
* PROGRAMMERS: Giannis Adamopoulos
*/
-#include <apitest.h>
-
-#include <wingdi.h>
-#include <winuser.h>
-
-#include <msgtrace.h>
-#include <user32testhelpers.h>
+#include "precomp.h"
HWND hWnd1, hWnd2;
diff --git a/modules/rostests/apitests/user32/EnumDisplaySettings.c
b/modules/rostests/apitests/user32/EnumDisplaySettings.c
index 0d058bb934..06ee987a2c 100644
--- a/modules/rostests/apitests/user32/EnumDisplaySettings.c
+++ b/modules/rostests/apitests/user32/EnumDisplaySettings.c
@@ -1,7 +1,5 @@
-#include <apitest.h>
-#include <wingdi.h>
-#include <winuser.h>
+#include "precomp.h"
#define SIZEOF_DEVMODEW_300_W 188
#define SIZEOF_DEVMODEW_400_W 212
diff --git a/modules/rostests/apitests/user32/GetDCEx.c
b/modules/rostests/apitests/user32/GetDCEx.c
index b9a183fa3b..6900797ccb 100644
--- a/modules/rostests/apitests/user32/GetDCEx.c
+++ b/modules/rostests/apitests/user32/GetDCEx.c
@@ -5,9 +5,7 @@
* PROGRAMMERS: Timo Kreuzer
*/
-#include <stdio.h>
-#include <wine/test.h>
-#include <windows.h>
+#include "precomp.h"
#define DCX_USESTYLE 0x00010000
@@ -446,4 +444,3 @@ START_TEST(GetDCEx)
Test_GetDCEx_CS_Mixed();
Test_GetDCEx_CS_SwitchedStyle();
}
-
diff --git a/modules/rostests/apitests/user32/GetIconInfo.c
b/modules/rostests/apitests/user32/GetIconInfo.c
index 6a36ad1247..b8da5148f8 100644
--- a/modules/rostests/apitests/user32/GetIconInfo.c
+++ b/modules/rostests/apitests/user32/GetIconInfo.c
@@ -1,10 +1,5 @@
-#include <apitest.h>
-
-#include <wingdi.h>
-#include <winuser.h>
-
-#include "resource.h"
+#include "precomp.h"
// FIXME user32
@@ -278,5 +273,3 @@ START_TEST(GetIconInfo)
/* Delete cursor */
DestroyCursor(hcursor);
}
-
-
diff --git a/modules/rostests/apitests/user32/GetKeyState.c
b/modules/rostests/apitests/user32/GetKeyState.c
index df90461062..e539bdbf91 100644
--- a/modules/rostests/apitests/user32/GetKeyState.c
+++ b/modules/rostests/apitests/user32/GetKeyState.c
@@ -5,10 +5,7 @@
* PROGRAMMERS: Giannis Adamopoulos
*/
-#include <apitest.h>
-
-#include <winuser.h>
-#include <assert.h>
+#include "precomp.h"
HHOOK hKbdHook, hKbdLLHook;
@@ -133,4 +130,4 @@ void Test_GetKeyState()
START_TEST(GetKeyState)
{
Test_GetKeyState();
-}
\ No newline at end of file
+}
diff --git a/modules/rostests/apitests/user32/GetPeekMessage.c
b/modules/rostests/apitests/user32/GetPeekMessage.c
index fc10725218..b947672a15 100644
--- a/modules/rostests/apitests/user32/GetPeekMessage.c
+++ b/modules/rostests/apitests/user32/GetPeekMessage.c
@@ -5,9 +5,7 @@
* PROGRAMMERS: Thomas Faber <thomas.faber(a)reactos.org>
*/
-#include <apitest.h>
-
-#include <winuser.h>
+#include "precomp.h"
void Test_GetMessage(HWND hWnd)
{
diff --git a/modules/rostests/apitests/user32/GetSystemMetrics.c
b/modules/rostests/apitests/user32/GetSystemMetrics.c
index f969a41cc4..9e6fd3feec 100644
--- a/modules/rostests/apitests/user32/GetSystemMetrics.c
+++ b/modules/rostests/apitests/user32/GetSystemMetrics.c
@@ -5,10 +5,7 @@
* PROGRAMMERS: Timo Kreuzer
*/
-#include <apitest.h>
-
-#include <wingdi.h>
-#include <winuser.h>
+#include "precomp.h"
void Test_GetSystemMetrics()
{
@@ -408,4 +405,3 @@ START_TEST(GetSystemMetrics)
{
Test_GetSystemMetrics();
}
-
diff --git a/modules/rostests/apitests/user32/GetUserObjectInformation.c
b/modules/rostests/apitests/user32/GetUserObjectInformation.c
index e509f31e0a..31ad447288 100644
--- a/modules/rostests/apitests/user32/GetUserObjectInformation.c
+++ b/modules/rostests/apitests/user32/GetUserObjectInformation.c
@@ -5,9 +5,8 @@
* PROGRAMMERS: Thomas Faber <thomas.faber(a)reactos.org>
*/
-#include <apitest.h>
-#include <wingdi.h>
-#include <winuser.h>
+#include "precomp.h"
+
#include <ndk/mmfuncs.h>
#include <ndk/pstypes.h>
#include <strsafe.h>
@@ -465,4 +464,4 @@ START_TEST(GetUserObjectInformation)
{
TestGetUserObjectInfoW();
TestGetUserObjectInfoA();
-}
\ No newline at end of file
+}
diff --git a/modules/rostests/apitests/user32/GetWindowPlacement.c
b/modules/rostests/apitests/user32/GetWindowPlacement.c
index c5fe2072e8..5871ef6eb5 100644
--- a/modules/rostests/apitests/user32/GetWindowPlacement.c
+++ b/modules/rostests/apitests/user32/GetWindowPlacement.c
@@ -5,8 +5,7 @@
* PROGRAMMERS: Thomas Faber <thomas.faber(a)reactos.org>
*/
-#include <apitest.h>
-#include <winuser.h>
+#include "precomp.h"
#define ALIGN_DOWN_BY(size, align) \
((ULONG_PTR)(size) & ~((ULONG_PTR)(align) - 1))
diff --git a/modules/rostests/apitests/user32/InitializeLpkHooks.c
b/modules/rostests/apitests/user32/InitializeLpkHooks.c
index 5090baa53b..eefaf7c609 100644
--- a/modules/rostests/apitests/user32/InitializeLpkHooks.c
+++ b/modules/rostests/apitests/user32/InitializeLpkHooks.c
@@ -5,9 +5,7 @@
* PROGRAMMERS: Magnus Olsen
*/
-#include <apitest.h>
-
-#include <winuser.h>
+#include "precomp.h"
typedef struct _LPK_LPEDITCONTROL_LIST
{
@@ -106,4 +104,3 @@ START_TEST(InitializeLpkHooks)
{
Test_InitializeLpkHooks();
}
-
diff --git a/modules/rostests/apitests/user32/LoadImage.c
b/modules/rostests/apitests/user32/LoadImage.c
index 39e09bd715..586e86988a 100644
--- a/modules/rostests/apitests/user32/LoadImage.c
+++ b/modules/rostests/apitests/user32/LoadImage.c
@@ -1,9 +1,5 @@
-#include <apitest.h>
-
-#include <stdio.h>
-#include <wingdi.h>
-#include <winuser.h>
+#include "precomp.h"
START_TEST(LoadImage)
{
diff --git a/modules/rostests/apitests/user32/LookupIconIdFromDirectoryEx.c
b/modules/rostests/apitests/user32/LookupIconIdFromDirectoryEx.c
index 218da48a1b..ac1392482f 100644
--- a/modules/rostests/apitests/user32/LookupIconIdFromDirectoryEx.c
+++ b/modules/rostests/apitests/user32/LookupIconIdFromDirectoryEx.c
@@ -1,10 +1,5 @@
-#include <apitest.h>
-
-#include <wingdi.h>
-#include <winuser.h>
-
-#include "resource.h"
+#include "precomp.h"
START_TEST(LookupIconIdFromDirectoryEx)
{
@@ -129,4 +124,4 @@ START_TEST(LookupIconIdFromDirectoryEx)
ok(ChangeDisplaySettingsExW(NULL, &dm, NULL, 0, NULL) == DISP_CHANGE_SUCCESSFUL,
"\n");
FreeResource(hMem);
-}
\ No newline at end of file
+}
diff --git a/modules/rostests/apitests/user32/NextDlgItem.c
b/modules/rostests/apitests/user32/NextDlgItem.c
index a27ee23176..38a0819881 100644
--- a/modules/rostests/apitests/user32/NextDlgItem.c
+++ b/modules/rostests/apitests/user32/NextDlgItem.c
@@ -5,12 +5,8 @@
* PROGRAMMERS: Katayama Hirofumi MZ
*/
-#include <stdarg.h>
-#include <stdio.h>
-#include <apitest.h>
+#include "precomp.h"
-#include <wingdi.h>
-#include <winuser.h>
#include <windowsx.h>
#include <dlgs.h>
diff --git a/modules/rostests/apitests/user32/RealGetWindowClass.c
b/modules/rostests/apitests/user32/RealGetWindowClass.c
index e47003f599..856c28c71f 100644
--- a/modules/rostests/apitests/user32/RealGetWindowClass.c
+++ b/modules/rostests/apitests/user32/RealGetWindowClass.c
@@ -5,10 +5,7 @@
* PROGRAMMERS: Gregor Gullwi
*/
-#include <apitest.h>
-
-#include <stdio.h>
-#include <winuser.h>
+#include "precomp.h"
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
@@ -189,4 +186,3 @@ START_TEST(RealGetWindowClass)
Test_ClassAtoms();
Test_RealGetWindowClass();
}
-
diff --git a/modules/rostests/apitests/user32/RegisterClassEx.c
b/modules/rostests/apitests/user32/RegisterClassEx.c
index 8134b98c23..7a7f3456fc 100644
--- a/modules/rostests/apitests/user32/RegisterClassEx.c
+++ b/modules/rostests/apitests/user32/RegisterClassEx.c
@@ -5,14 +5,7 @@
* PROGRAMMERS: Giannis Adamopoulos
*/
-#include <apitest.h>
-#define WIN32_NO_STATUS
-#include <ndk/rtlfuncs.h>
-
-#include <wchar.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <undocuser.h>
+#include "precomp.h"
static ATOM _RegisterClass(LPCWSTR lpwszClassName, HINSTANCE hInstance, UINT style,
WNDPROC lpfnWndProc)
{
diff --git a/modules/rostests/apitests/user32/RegisterHotKey.c
b/modules/rostests/apitests/user32/RegisterHotKey.c
index 529797422e..c390157239 100644
--- a/modules/rostests/apitests/user32/RegisterHotKey.c
+++ b/modules/rostests/apitests/user32/RegisterHotKey.c
@@ -5,12 +5,7 @@
* PROGRAMMERS: Thomas Faber <thomas.faber(a)reactos.org>
*/
-#include <apitest.h>
-
-#include <winuser.h>
-#include <shlobj.h>
-#include <undocshell.h>
-#include <undocuser.h>
+#include "precomp.h"
#define msg_hotkey(msg, id, mod, vk) do
\
{
\
diff --git a/modules/rostests/apitests/user32/ScrollDC.c
b/modules/rostests/apitests/user32/ScrollDC.c
index 33bae38899..4b3bee03e0 100644
--- a/modules/rostests/apitests/user32/ScrollDC.c
+++ b/modules/rostests/apitests/user32/ScrollDC.c
@@ -5,10 +5,7 @@
* PROGRAMMERS: Timo Kreuzer
*/
-#include <apitest.h>
-
-#include <wingdi.h>
-#include <winuser.h>
+#include "precomp.h"
void Test_ScrollDC()
{
@@ -75,4 +72,3 @@ START_TEST(ScrollDC)
{
Test_ScrollDC();
}
-
diff --git a/modules/rostests/apitests/user32/ScrollWindowEx.c
b/modules/rostests/apitests/user32/ScrollWindowEx.c
index 2c0ce9679e..4d403174aa 100644
--- a/modules/rostests/apitests/user32/ScrollWindowEx.c
+++ b/modules/rostests/apitests/user32/ScrollWindowEx.c
@@ -5,10 +5,7 @@
* PROGRAMMERS: Timo Kreuzer
*/
-#include <apitest.h>
-
-#include <wingdi.h>
-#include <winuser.h>
+#include "precomp.h"
void Test_ScrollWindowEx()
{
@@ -61,4 +58,3 @@ START_TEST(ScrollWindowEx)
{
Test_ScrollWindowEx();
}
-
diff --git a/modules/rostests/apitests/user32/SendMessageTimeout.c
b/modules/rostests/apitests/user32/SendMessageTimeout.c
index 90fcc31628..e633168732 100644
--- a/modules/rostests/apitests/user32/SendMessageTimeout.c
+++ b/modules/rostests/apitests/user32/SendMessageTimeout.c
@@ -5,11 +5,7 @@
* PROGRAMMERS: Thomas Faber <thomas.faber(a)reactos.org>
*/
-#include <apitest.h>
-#include <winuser.h>
-
-#include <msgtrace.h>
-#include <user32testhelpers.h>
+#include "precomp.h"
static DWORD dwThread1;
static DWORD dwThread2;
diff --git a/modules/rostests/apitests/user32/SetActiveWindow.c
b/modules/rostests/apitests/user32/SetActiveWindow.c
index 4ba07cfd86..110289b54b 100644
--- a/modules/rostests/apitests/user32/SetActiveWindow.c
+++ b/modules/rostests/apitests/user32/SetActiveWindow.c
@@ -5,14 +5,7 @@
* PROGRAMMERS: Giannis Adamopoulos
*/
-#include <apitest.h>
-
-#include <wingdi.h>
-#include <winuser.h>
-#include <undocuser.h>
-
-#include <msgtrace.h>
-#include <user32testhelpers.h>
+#include "precomp.h"
HWND hWnd1, hWnd2;
diff --git a/modules/rostests/apitests/user32/SetCursorPos.c
b/modules/rostests/apitests/user32/SetCursorPos.c
index 052e300e52..9ac6e2bfe0 100644
--- a/modules/rostests/apitests/user32/SetCursorPos.c
+++ b/modules/rostests/apitests/user32/SetCursorPos.c
@@ -5,11 +5,7 @@
* PROGRAMMERS: Giannis Adamopoulos
*/
-#include <apitest.h>
-
-#include <wingdi.h>
-#include <winuser.h>
-#include <assert.h>
+#include "precomp.h"
HHOOK hMouseHookLL, hMouseHook;
diff --git a/modules/rostests/apitests/user32/SetParent.c
b/modules/rostests/apitests/user32/SetParent.c
index 7ee1e406dd..79452cb46b 100644
--- a/modules/rostests/apitests/user32/SetParent.c
+++ b/modules/rostests/apitests/user32/SetParent.c
@@ -5,11 +5,7 @@
* PROGRAMMERS: Thomas Faber <thomas.faber(a)reactos.org>
*/
-#include <apitest.h>
-
-#include <winuser.h>
-#include <msgtrace.h>
-#include <user32testhelpers.h>
+#include "precomp.h"
static HWND hWndList[5 + 1];
static const int hWndCount = sizeof(hWndList) / sizeof(hWndList[0]) - 1;
diff --git a/modules/rostests/apitests/user32/SetProp.c
b/modules/rostests/apitests/user32/SetProp.c
index de57337c23..3d656fd993 100644
--- a/modules/rostests/apitests/user32/SetProp.c
+++ b/modules/rostests/apitests/user32/SetProp.c
@@ -5,9 +5,7 @@
* PROGRAMMERS: Thomas Faber <thomas.faber(a)reactos.org>
*/
-#include <apitest.h>
-#include <winuser.h>
-#include <user32testhelpers.h>
+#include "precomp.h"
static ATOM Atom1, Atom2, Atom3;
diff --git a/modules/rostests/apitests/user32/SetScrollInfo.c
b/modules/rostests/apitests/user32/SetScrollInfo.c
index 59faad01fb..1d9d9f00c4 100644
--- a/modules/rostests/apitests/user32/SetScrollInfo.c
+++ b/modules/rostests/apitests/user32/SetScrollInfo.c
@@ -5,10 +5,7 @@
* PROGRAMMERS: Thomas Faber <thomas.faber(a)reactos.org>
*/
-#include <apitest.h>
-
-#include <wingdi.h>
-#include <winuser.h>
+#include "precomp.h"
START_TEST(SetScrollInfo)
{
diff --git a/modules/rostests/apitests/user32/SetScrollRange.c
b/modules/rostests/apitests/user32/SetScrollRange.c
index f73db6bf87..75c5479737 100644
--- a/modules/rostests/apitests/user32/SetScrollRange.c
+++ b/modules/rostests/apitests/user32/SetScrollRange.c
@@ -5,10 +5,7 @@
* PROGRAMMERS: Thomas Faber <thomas.faber(a)reactos.org>
*/
-#include <apitest.h>
-
-#include <wingdi.h>
-#include <winuser.h>
+#include "precomp.h"
START_TEST(SetScrollRange)
{
diff --git a/modules/rostests/apitests/user32/SystemParametersInfo.c
b/modules/rostests/apitests/user32/SystemParametersInfo.c
index 2b84508715..64330bc79b 100644
--- a/modules/rostests/apitests/user32/SystemParametersInfo.c
+++ b/modules/rostests/apitests/user32/SystemParametersInfo.c
@@ -5,14 +5,7 @@
* PROGRAMMERS: Giannis Adamopoulos
*/
-#include <apitest.h>
-
-#include <wingdi.h>
-#include <winuser.h>
-#include <undocuser.h>
-
-#include <msgtrace.h>
-#include <user32testhelpers.h>
+#include "precomp.h"
HWND hWnd1, hWnd2;
@@ -193,4 +186,4 @@ START_TEST(SystemParametersInfo)
DestroyWindow(hWnd1);
DestroyWindow(hWnd2);
UnregisterClassW(L"sysparamstest", 0);
-}
\ No newline at end of file
+}
diff --git a/modules/rostests/apitests/user32/TrackMouseEvent.c
b/modules/rostests/apitests/user32/TrackMouseEvent.c
index 7cc76467e5..6024489842 100644
--- a/modules/rostests/apitests/user32/TrackMouseEvent.c
+++ b/modules/rostests/apitests/user32/TrackMouseEvent.c
@@ -5,13 +5,7 @@
* PROGRAMMERS: Giannis Adamopoulos
*/
-#include <apitest.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <undocuser.h>
-
-#include <msgtrace.h>
-#include <user32testhelpers.h>
+#include "precomp.h"
HWND hWnd1, hWnd2, hWnd3;
HHOOK hMouseHookLL, hMouseHook;
diff --git a/modules/rostests/apitests/user32/WndProc.c
b/modules/rostests/apitests/user32/WndProc.c
index bdcff2f8d5..185726f8cc 100644
--- a/modules/rostests/apitests/user32/WndProc.c
+++ b/modules/rostests/apitests/user32/WndProc.c
@@ -5,10 +5,7 @@
* PROGRAMMERS:
*/
-#include <apitest.h>
-
-#include <wingdi.h>
-#include <winuser.h>
+#include "precomp.h"
/* Used wine Redraw test for proof in principle. */
diff --git a/modules/rostests/apitests/user32/desktop.c
b/modules/rostests/apitests/user32/desktop.c
index e20450137e..f7bffe0721 100644
--- a/modules/rostests/apitests/user32/desktop.c
+++ b/modules/rostests/apitests/user32/desktop.c
@@ -6,17 +6,9 @@
* Thomas Faber
*/
-#define WIN32_NO_STATUS
-#include <apitest.h>
-
-#include <stdio.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <user32testhelpers.h>
-#include <ndk/umtypes.h>
-#include <ndk/obfuncs.h>
+#include "precomp.h"
-#define DESKTOP_ALL_ACCESS 0x01ff
+#include <ndk/obfuncs.h>
struct test_info {
WCHAR* ExpectedWinsta;
diff --git a/modules/rostests/apitests/user32/precomp.h
b/modules/rostests/apitests/user32/precomp.h
new file mode 100644
index 0000000000..8cb2810b59
--- /dev/null
+++ b/modules/rostests/apitests/user32/precomp.h
@@ -0,0 +1,18 @@
+#ifndef _USER32_APITEST_PRECOMP_H_
+#define _USER32_APITEST_PRECOMP_H_
+
+#define WIN32_NO_STATUS
+#include <assert.h>
+#include <stdio.h>
+#include <apitest.h>
+#include <wingdi.h>
+#include <winuser.h>
+#include <msgtrace.h>
+#include <user32testhelpers.h>
+#include <undocuser.h>
+
+#include "resource.h"
+
+#define DESKTOP_ALL_ACCESS 0x01ff
+
+#endif /* _USER32_APITEST_PRECOMP_H_ */