2 * PROJECT: ReactOS api tests
3 * LICENSE: GPL - See COPYING in the top level directory
4 * PURPOSE: Test for SetSysColors
5 * PROGRAMMERS: Timo Kreuzer
12 #define TEST(x) ok(x, #x"\n")
13 #define RTEST(x) ok(x, #x"\n")
15 #define NUM_SYSCOLORS 31
17 void Test_SetSysColors()
20 INT nElements
[NUM_SYSCOLORS
];
21 COLORREF crOldColors
[NUM_SYSCOLORS
];
22 COLORREF crColors
[3] = {RGB(212, 208, 200),2,3};
24 /* First save the Old colors */
25 for (i
= 0; i
< NUM_SYSCOLORS
; i
++)
28 crOldColors
[i
] = GetSysColor(i
);
31 TEST((UINT
)SetSysColors(0, nElements
, crColors
) == 1);
32 RTEST((UINT
)SetSysColors(1, nElements
, crColors
) == 1);
33 RTEST((UINT
)SetSysColors(2, nElements
, crColors
) == 1);
35 /* try more than NUM_SYSCOLORS */
36 RTEST((UINT
)SetSysColors(55, nElements
, crColors
) == 1);
38 /* restore old SysColors */
39 SetSysColors(NUM_SYSCOLORS
, nElements
, crOldColors
);
42 START_TEST(SetSysColors
)