64e3e27e222a4dc40fa339f2f81d38ca2d7b0966
1 #define NUM_SYSCOLORS 31
4 Test_SetSysColors(PTESTINFO pti
)
7 INT nElements
[NUM_SYSCOLORS
];
8 COLORREF crOldColors
[NUM_SYSCOLORS
];
9 COLORREF crColors
[3] = {RGB(212, 208, 200),2,3};
11 /* First save the Old colors */
12 for (i
= 0; i
< NUM_SYSCOLORS
; i
++)
15 crOldColors
[i
] = GetSysColor(i
);
18 TEST((UINT
)SetSysColors(0, nElements
, crColors
) == 1);
19 RTEST((UINT
)SetSysColors(1, nElements
, crColors
) == 1);
20 RTEST((UINT
)SetSysColors(2, nElements
, crColors
) == 1);
22 /* try more than NUM_SYSCOLORS */
23 RTEST((UINT
)SetSysColors(55, nElements
, crColors
) == 1);
25 /* restore old SysColors */
26 SetSysColors(NUM_SYSCOLORS
, nElements
, crOldColors
);
28 return APISTATUS_NORMAL
;