Author: jimtabor
Date: Wed Nov 13 17:21:41 2013
New Revision: 60974
URL:
http://svn.reactos.org/svn/reactos?rev=60974&view=rev
Log:
- Wine had some fixups added since this was last synced. CORE-???? & CORE-7574.
Modified:
trunk/rostests/winetests/user32/sysparams.c
Modified: trunk/rostests/winetests/user32/sysparams.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/user32/sysparam…
==============================================================================
--- trunk/rostests/winetests/user32/sysparams.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/user32/sysparams.c [iso-8859-1] Wed Nov 13 17:21:41 2013
@@ -41,9 +41,9 @@
static LONG (WINAPI *pChangeDisplaySettingsExA)(LPCSTR, LPDEVMODEA, HWND, DWORD,
LPVOID);
-static int strict;
+static BOOL strict;
static int dpi;
-static int iswin9x;
+static BOOL iswin9x;
static HDC hdc;
#define eq(received, expected, label, type) \
@@ -530,48 +530,48 @@
curr_val = TRUE;
rc=SystemParametersInfoA( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE |
SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETBEEP")) return;
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
test_change_message( SPI_SETBEEP, 0 );
test_reg_key( SPI_SETBEEP_REGKEY,
SPI_SETBEEP_VALNAME,
curr_val ? "Yes" : "No" );
rc=SystemParametersInfoA( SPI_GETBEEP, 0, &b, 0 );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
eq( b, curr_val, "SPI_{GET,SET}BEEP", "%d" );
rc=SystemParametersInfoW( SPI_GETBEEP, 0, &b, 0 );
- if (rc!=0 || GetLastError()!=ERROR_CALL_NOT_IMPLEMENTED)
- {
- ok(rc!=0,"SystemParametersInfoW: rc=%d err=%d\n",rc,GetLastError());
+ if (rc || GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
+ {
+ ok(rc, "SystemParametersInfoW: rc=%d err=%d\n", rc, GetLastError());
eq( b, curr_val, "SystemParametersInfoW", "%d" );
}
/* is a message sent for the second change? */
rc=SystemParametersInfoA( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE |
SPIF_SENDCHANGE );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
test_change_message( SPI_SETBEEP, 0 );
curr_val = FALSE;
rc=SystemParametersInfoW( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE |
SPIF_SENDCHANGE );
- if (rc==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
+ if (rc == FALSE && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
rc=SystemParametersInfoA( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE |
SPIF_SENDCHANGE );
- ok(rc!=0,"SystemParametersInfo: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfo: rc=%d err=%d\n", rc, GetLastError());
test_change_message( SPI_SETBEEP, 0 );
test_reg_key( SPI_SETBEEP_REGKEY,
SPI_SETBEEP_VALNAME,
curr_val ? "Yes" : "No" );
rc=SystemParametersInfoA( SPI_GETBEEP, 0, &b, 0 );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
eq( b, curr_val, "SPI_{GET,SET}BEEP", "%d" );
rc=SystemParametersInfoW( SPI_GETBEEP, 0, &b, 0 );
- if (rc!=0 || GetLastError()!=ERROR_CALL_NOT_IMPLEMENTED)
- {
- ok(rc!=0,"SystemParametersInfoW: rc=%d err=%d\n",rc,GetLastError());
+ if (rc || GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
+ {
+ ok(rc, "SystemParametersInfoW: rc=%d err=%d\n", rc, GetLastError());
eq( b, curr_val, "SystemParametersInfoW", "%d" );
}
ok( MessageBeep( MB_OK ), "Return value of MessageBeep when sound is
disabled\n" );
rc=SystemParametersInfoA( SPI_SETBEEP, old_b, 0, SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static const char *setmouse_valuenames[3] = {
@@ -588,21 +588,21 @@
BOOL rc;
INT mi[3];
static int aw_turn = 0;
- static BOOL w_implemented = 1;
+ static BOOL w_implemented = TRUE;
char buf[20];
int i;
aw_turn++;
- rc=0;
+ rc = FALSE;
if ((aw_turn % 2!=0) && (w_implemented))
{
/* call unicode on odd (non even) calls */
SetLastError(0xdeadbeef);
rc=SystemParametersInfoW( SPI_SETMOUSE, 0, curr_val, SPIF_UPDATEINIFILE |
SPIF_SENDCHANGE );
- if (rc==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
+ if (rc == FALSE && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
- w_implemented = 0;
+ w_implemented = FALSE;
trace("SystemParametersInfoW not supported on this platform\n");
}
}
@@ -614,7 +614,7 @@
}
if (!test_error_msg(rc,"SPI_SETMOUSE")) return FALSE;
- ok(rc!=0,"SystemParametersInfo: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfo: rc=%d err=%d\n", rc, GetLastError());
test_change_message( SPI_SETMOUSE, 0 );
for (i = 0; i < 3; i++)
{
@@ -623,7 +623,7 @@
}
rc=SystemParametersInfoA( SPI_GETMOUSE, 0, mi, 0 );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
for (i = 0; i < 3; i++)
{
ok(mi[i] == curr_val[i],
@@ -633,7 +633,7 @@
if (w_implemented)
{
rc=SystemParametersInfoW( SPI_GETMOUSE, 0, mi, 0 );
- ok(rc!=0,"SystemParametersInfoW: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoW: rc=%d err=%d\n", rc, GetLastError());
for (i = 0; i < 3; i++)
{
ok(mi[i] == curr_val[i],
@@ -718,7 +718,7 @@
run_spi_setmouse_test( curr_val, req_change, proj_change8, nchange );
rc=SystemParametersInfoA( SPI_SETMOUSE, 0, old_mi, SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static BOOL test_setborder(UINT curr_val, int usesetborder, int dpi)
@@ -730,18 +730,18 @@
ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICSA, iPaddedBorderWidth);
rc=SystemParametersInfoA( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
if( usesetborder) {
rc=SystemParametersInfoA( SPI_SETBORDER, curr_val, 0, SPIF_UPDATEINIFILE |
SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETBORDER")) return FALSE;
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
test_change_message( SPI_SETBORDER, 1 );
} else { /* set non client metrics */
ncm.iBorderWidth = curr_val;
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &ncm,
SPIF_UPDATEINIFILE|
SPIF_SENDCHANGE);
if (!test_error_msg(rc,"SPI_SETNONCLIENTMETRICS")) return FALSE;
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
test_change_message( SPI_SETNONCLIENTMETRICS, 1 );
}
if( curr_val) { /* skip if 0, some windows versions return 0 others 1 */
@@ -754,11 +754,11 @@
if (curr_val == 0) curr_val = 1;
/* should be the same as the non client metrics */
rc=SystemParametersInfoA( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
eq( (UINT)ncm.iBorderWidth, curr_val, "NonClientMetric.iBorderWidth",
"%d");
/* and from SPI_GETBORDER */
rc=SystemParametersInfoA( SPI_GETBORDER, 0, &border, 0 );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
eq( border, curr_val, "SPI_{GET,SET}BORDER", "%d");
/* test some SystemMetrics */
frame = curr_val + GetSystemMetrics( SM_CXDLGFRAME );
@@ -830,8 +830,7 @@
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &ncmsave,
SPIF_UPDATEINIFILE| SPIF_SENDCHANGE);
test_change_message( SPI_SETNONCLIENTMETRICS, 1 );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",
- rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETKEYBOARDSPEED( void ) /* 10 */
@@ -855,18 +854,18 @@
rc=SystemParametersInfoA( SPI_SETKEYBOARDSPEED, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETKEYBOARDSPEED")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETKEYBOARDSPEED, 0 );
sprintf( buf, "%d", vals[i] );
test_reg_key( SPI_SETKEYBOARDSPEED_REGKEY, SPI_SETKEYBOARDSPEED_VALNAME, buf );
rc=SystemParametersInfoA( SPI_GETKEYBOARDSPEED, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
eq( v, vals[i], "SPI_{GET,SET}KEYBOARDSPEED", "%d" );
}
rc=SystemParametersInfoA( SPI_SETKEYBOARDSPEED, old_speed, 0, SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
/* test_SPI_ICONHORIZONTALSPACING helper */
@@ -879,7 +878,7 @@
rc=SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, curr_val, 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
if (!test_error_msg(rc,"SPI_ICONHORIZONTALSPACING")) return FALSE;
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
test_change_message( SPI_ICONHORIZONTALSPACING, 0 );
if( curr_val < 32) curr_val = 32;
/* The registry keys depend on the Windows version and the values too
@@ -892,14 +891,14 @@
"wrong value in registry %d, expected %d\n", regval, curr_val);
/* compare with what SPI_ICONHORIZONTALSPACING returns */
rc=SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, 0, &spacing, 0 );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
eq( spacing, curr_val, "ICONHORIZONTALSPACING", "%d");
/* and with a system metrics */
eq( GetSystemMetrics( SM_CXICONSPACING ), curr_val, "SM_CXICONSPACING",
"%d" );
/* and with what SPI_GETICONMETRICS returns */
im.cbSize = sizeof(ICONMETRICSA);
rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im, FALSE
);
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
eq( im.iHorzSpacing, curr_val, "SPI_GETICONMETRICS", "%d" );
return TRUE;
}
@@ -920,7 +919,7 @@
dotest_spi_iconhorizontalspacing( 10); /* minimum is 32 */
/* restore */
rc=SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, old_spacing, 0,
SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETSCREENSAVETIMEOUT( void ) /* 14 */
@@ -944,20 +943,20 @@
rc=SystemParametersInfoA( SPI_SETSCREENSAVETIMEOUT, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETSCREENSAVETIMEOUT")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETSCREENSAVETIMEOUT, 0 );
sprintf( buf, "%d", vals[i] );
test_reg_key( SPI_SETSCREENSAVETIMEOUT_REGKEY,
SPI_SETSCREENSAVETIMEOUT_VALNAME, buf );
- SystemParametersInfoA( SPI_GETSCREENSAVETIMEOUT, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ rc = SystemParametersInfoA( SPI_GETSCREENSAVETIMEOUT, 0, &v, 0 );
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
eq( v, vals[i], "SPI_{GET,SET}SCREENSAVETIMEOUT", "%d" );
}
rc=SystemParametersInfoA( SPI_SETSCREENSAVETIMEOUT, old_timeout, 0,
SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETSCREENSAVEACTIVE( void ) /* 17 */
@@ -980,20 +979,20 @@
rc=SystemParametersInfoA( SPI_SETSCREENSAVEACTIVE, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETSCREENSAVEACTIVE")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETSCREENSAVEACTIVE, 0 );
test_reg_key( SPI_SETSCREENSAVEACTIVE_REGKEY,
SPI_SETSCREENSAVEACTIVE_VALNAME,
vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETSCREENSAVEACTIVE, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
ok(v == vals[i] || broken(! v) /* Win 7 */,
"SPI_{GET,SET}SCREENSAVEACTIVE: got %d instead of %d\n", v,
vals[i]);
}
rc=SystemParametersInfoA( SPI_SETSCREENSAVEACTIVE, old_b, 0, SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETGRIDGRANULARITY( void ) /* 19 */
@@ -1022,19 +1021,19 @@
rc=SystemParametersInfoA( SPI_SETKEYBOARDDELAY, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETKEYBOARDDELAY")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETKEYBOARDDELAY, 0 );
sprintf( buf, "%d", vals[i] );
test_reg_key( SPI_SETKEYBOARDDELAY_REGKEY,
SPI_SETKEYBOARDDELAY_VALNAME, buf );
rc=SystemParametersInfoA( SPI_GETKEYBOARDDELAY, 0, &delay, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
eq( delay, vals[i], "SPI_{GET,SET}KEYBOARDDELAY", "%d" );
}
rc=SystemParametersInfoA( SPI_SETKEYBOARDDELAY, old_delay, 0, SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
@@ -1048,7 +1047,7 @@
rc=SystemParametersInfoA( SPI_ICONVERTICALSPACING, curr_val, 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
if (!test_error_msg(rc,"SPI_ICONVERTICALSPACING")) return FALSE;
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
test_change_message( SPI_ICONVERTICALSPACING, 0 );
if( curr_val < 32) curr_val = 32;
/* The registry keys depend on the Windows version and the values too
@@ -1061,14 +1060,14 @@
"wrong value in registry %d, expected %d\n", regval, curr_val);
/* compare with what SPI_ICONVERTICALSPACING returns */
rc=SystemParametersInfoA( SPI_ICONVERTICALSPACING, 0, &spacing, 0 );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
eq( spacing, curr_val, "ICONVERTICALSPACING", "%d" );
/* and with a system metrics */
eq( GetSystemMetrics( SM_CYICONSPACING ), curr_val, "SM_CYICONSPACING",
"%d" );
/* and with what SPI_GETICONMETRICS returns */
im.cbSize = sizeof(ICONMETRICSA);
rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im, FALSE
);
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
eq( im.iVertSpacing, curr_val, "SPI_GETICONMETRICS", "%d" );
return TRUE;
}
@@ -1091,8 +1090,7 @@
/* restore */
rc=SystemParametersInfoA( SPI_ICONVERTICALSPACING, old_spacing, 0,
SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",
- rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETICONTITLEWRAP( void ) /* 26 */
@@ -1124,7 +1122,7 @@
rc=SystemParametersInfoA( SPI_SETICONTITLEWRAP, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETICONTITLEWRAP")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETICONTITLEWRAP, 1 );
regval = metricfromreg( SPI_SETICONTITLEWRAP_REGKEY2,
SPI_SETICONTITLEWRAP_VALNAME, dpi);
@@ -1135,17 +1133,17 @@
"wrong value in registry %d, expected %d\n", regval, vals[i]
);
rc=SystemParametersInfoA( SPI_GETICONTITLEWRAP, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
eq( v, vals[i], "SPI_{GET,SET}ICONTITLEWRAP", "%d" );
/* and test with what SPI_GETICONMETRICS returns */
im.cbSize = sizeof(ICONMETRICSA);
rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im,
FALSE );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
eq( im.iTitleWrap, (BOOL)vals[i], "SPI_GETICONMETRICS", "%d"
);
}
rc=SystemParametersInfoA( SPI_SETICONTITLEWRAP, old_b, 0, SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */
@@ -1168,7 +1166,7 @@
rc=SystemParametersInfoA( SPI_SETMENUDROPALIGNMENT, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETMENUDROPALIGNMENT")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETMENUDROPALIGNMENT, 0 );
test_reg_key_ex( SPI_SETMENUDROPALIGNMENT_REGKEY1,
SPI_SETMENUDROPALIGNMENT_REGKEY2,
@@ -1176,7 +1174,7 @@
vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETMENUDROPALIGNMENT, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
eq( v, vals[i], "SPI_{GET,SET}MENUDROPALIGNMENT", "%d" );
eq( GetSystemMetrics( SM_MENUDROPALIGNMENT ), (int)vals[i],
"SM_MENUDROPALIGNMENT", "%d" );
@@ -1184,7 +1182,7 @@
rc=SystemParametersInfoA( SPI_SETMENUDROPALIGNMENT, old_b, 0,
SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETDOUBLECLKWIDTH( void ) /* 29 */
@@ -1218,7 +1216,7 @@
rc=SystemParametersInfoA( SPI_SETDOUBLECLKWIDTH, old_width, 0,
SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETDOUBLECLKHEIGHT( void ) /* 30 */
@@ -1252,7 +1250,7 @@
rc=SystemParametersInfoA( SPI_SETDOUBLECLKHEIGHT, old_height, 0,
SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETDOUBLECLICKTIME( void ) /* 32 */
@@ -1283,7 +1281,7 @@
curr_val = 1000;
rc=SystemParametersInfoA( SPI_SETDOUBLECLICKTIME, curr_val, 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
test_change_message( SPI_SETDOUBLECLICKTIME, 0 );
sprintf( buf, "%d", curr_val );
test_reg_key( SPI_SETDOUBLECLICKTIME_REGKEY,
@@ -1308,7 +1306,7 @@
eq( GetDoubleClickTime(), curr_val, "GetDoubleClickTime", "%d"
);
rc=SystemParametersInfoA(SPI_SETDOUBLECLICKTIME, old_time, 0, SPIF_UPDATEINIFILE);
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETMOUSEBUTTONSWAP( void ) /* 33 */
@@ -1342,7 +1340,7 @@
rc=SystemParametersInfoA( SPI_SETMOUSEBUTTONSWAP, old_b, 0,
SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETFASTTASKSWITCH( void ) /* 36 */
@@ -1383,19 +1381,19 @@
rc=SystemParametersInfoA( SPI_SETDRAGFULLWINDOWS, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETDRAGFULLWINDOWS")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETDRAGFULLWINDOWS, 0 );
test_reg_key( SPI_SETDRAGFULLWINDOWS_REGKEY,
SPI_SETDRAGFULLWINDOWS_VALNAME,
vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETDRAGFULLWINDOWS, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
eq( v, vals[i], "SPI_{GET,SET}DRAGFULLWINDOWS", "%d" );
}
rc=SystemParametersInfoA( SPI_SETDRAGFULLWINDOWS, old_b, 0, SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
#define test_reg_metric( KEY, VAL, val) \
@@ -1514,11 +1512,11 @@
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &Ncmnew,
SPIF_UPDATEINIFILE|
SPIF_SENDCHANGE);
if (!test_error_msg(rc,"SPI_SETNONCLIENTMETRICS")) return;
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
test_change_message( SPI_SETNONCLIENTMETRICS, 1 );
/* get them back */
rc=SystemParametersInfoA( SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSA),
&Ncmcur, FALSE );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
/* test registry entries */
TEST_NONCLIENTMETRICS_REG( Ncmcur)
/* test the system metrics with these settings */
@@ -1537,13 +1535,13 @@
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &Ncmnew,
SPIF_UPDATEINIFILE|
SPIF_SENDCHANGE);
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
test_change_message( SPI_SETNONCLIENTMETRICS, 1 );
/* raw values are in registry */
TEST_NONCLIENTMETRICS_REG( Ncmnew)
/* get them back */
rc=SystemParametersInfoA( SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSA),
&Ncmcur, FALSE );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
/* cooked values are returned */
expect = max( Ncmnew.iMenuHeight, 2 + get_tmheight( &Ncmnew.lfMenuFont, 1));
ok( Ncmcur.iMenuHeight == expect,
@@ -1569,7 +1567,7 @@
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSA),
&Ncmorig, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
test_change_message( SPI_SETNONCLIENTMETRICS, 0 );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
/* test the system metrics with these settings */
test_GetSystemMetrics();
}
@@ -1614,10 +1612,10 @@
rc=SystemParametersInfoA( SPI_SETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS),
&lpMm_cur, SPIF_UPDATEINIFILE );
if (!test_error_msg(rc,"SPI_SETMINIMIZEDMETRICS")) return;
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
/* read them back */
rc=SystemParametersInfoA( SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS),
&lpMm_new, FALSE );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
/* and compare */
eq( lpMm_new.iWidth, lpMm_cur.iWidth, "iWidth", "%d" );
eq( lpMm_new.iHorzGap, lpMm_cur.iHorzGap, "iHorzGap", "%d" );
@@ -1652,10 +1650,10 @@
lpMm_cur.iArrange = - 1;
rc=SystemParametersInfoA( SPI_SETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS),
&lpMm_cur, SPIF_UPDATEINIFILE );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
/* read back */
rc=SystemParametersInfoA( SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS),
&lpMm_new, FALSE );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
/* the width and H/V gaps have minimum 0, arrange is and'd with 0xf */
eq( lpMm_new.iWidth, 0, "iWidth", "%d" );
eq( lpMm_new.iHorzGap, 0, "iHorzGap", "%d" );
@@ -1690,10 +1688,10 @@
/* restore */
rc=SystemParametersInfoA( SPI_SETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS),
&lpMm_orig, SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
/* check that */
rc=SystemParametersInfoA( SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS),
&lpMm_new, FALSE );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
eq( lpMm_new.iWidth, lpMm_orig.iWidth, "iWidth", "%d" );
eq( lpMm_new.iHorzGap, lpMm_orig.iHorzGap, "iHorzGap", "%d" );
eq( lpMm_new.iVertGap, lpMm_orig.iVertGap, "iVertGap", "%d" );
@@ -1757,10 +1755,10 @@
rc=SystemParametersInfoA( SPI_SETICONMETRICS, sizeof(ICONMETRICSA), &im_cur,
SPIF_UPDATEINIFILE );
if (!test_error_msg(rc,"SPI_SETICONMETRICS")) return;
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im_new,
FALSE );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
/* test GET <-> SETICONMETRICS */
eq( im_new.iHorzSpacing, im_cur.iHorzSpacing, "iHorzSpacing",
"%d" );
eq( im_new.iVertSpacing, im_cur.iVertSpacing, "iVertSpacing",
"%d" );
@@ -1809,11 +1807,11 @@
wrap, im_cur.iTitleWrap);
/* restore old values */
rc=SystemParametersInfoA( SPI_SETICONMETRICS, sizeof(ICONMETRICSA),
&im_orig,SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
-
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
+
rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im_new,
FALSE );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
-
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
+
eq( im_new.iHorzSpacing, im_orig.iHorzSpacing, "iHorzSpacing",
"%d" );
eq( im_new.iVertSpacing, im_orig.iVertSpacing, "iVertSpacing",
"%d" );
eq( im_new.iTitleWrap, im_orig.iTitleWrap, "iTitleWrap",
"%d" );
@@ -1845,9 +1843,9 @@
rc=SystemParametersInfoA( SPI_SETWORKAREA, 0, &curr_val,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETWORKAREA")) return;
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
rc=SystemParametersInfoA( SPI_GETWORKAREA, 0, &area, 0 );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
if( !EqualRect( &area, &curr_val)) /* no message if rect has not changed */
test_change_message( SPI_SETWORKAREA, 0);
eq( area.left, curr_val.left, "left", "%d" );
@@ -1860,9 +1858,9 @@
curr_val = area;
rc=SystemParametersInfoA( SPI_SETWORKAREA, 0, &old_area,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
rc=SystemParametersInfoA( SPI_GETWORKAREA, 0, &area, 0 );
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
if( !EqualRect( &area, &curr_val)) /* no message if rect has not changed */
test_change_message( SPI_SETWORKAREA, 0 );
eq( area.left, old_area.left, "left", "%d" );
@@ -1895,21 +1893,21 @@
rc=SystemParametersInfoA( SPI_SETSHOWSOUNDS, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETSHOWSOUNDS")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETSHOWSOUNDS, 1 );
test_reg_key( SPI_SETSHOWSOUNDS_REGKEY,
SPI_SETSHOWSOUNDS_VALNAME,
vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETSHOWSOUNDS, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
eq( v, vals[i], "SPI_GETSHOWSOUNDS", "%d" );
eq( GetSystemMetrics( SM_SHOWSOUNDS ), (int)vals[i],
"SM_SHOWSOUNDS", "%d" );
}
rc=SystemParametersInfoA( SPI_SETSHOWSOUNDS, old_b, 0, SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETKEYBOARDPREF( void ) /* 69 */
@@ -1932,19 +1930,19 @@
rc=SystemParametersInfoA( SPI_SETKEYBOARDPREF, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETKEYBOARDPREF")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETKEYBOARDPREF, 1 );
test_reg_key_ex2( SPI_SETKEYBOARDPREF_REGKEY, SPI_SETKEYBOARDPREF_REGKEY_LEGACY,
SPI_SETKEYBOARDPREF_VALNAME,
SPI_SETKEYBOARDPREF_VALNAME_LEGACY,
vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETKEYBOARDPREF, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
eq( v, (BOOL)vals[i], "SPI_GETKEYBOARDPREF", "%d" );
}
rc=SystemParametersInfoA( SPI_SETKEYBOARDPREF, old_b, 0, SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETSCREENREADER( void ) /* 71 */
@@ -1967,19 +1965,19 @@
rc=SystemParametersInfoA( SPI_SETSCREENREADER, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETSCREENREADER")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETSCREENREADER, 1 );
test_reg_key_ex2_optional( SPI_SETSCREENREADER_REGKEY,
SPI_SETSCREENREADER_REGKEY_LEGACY,
SPI_SETSCREENREADER_VALNAME,
SPI_SETSCREENREADER_VALNAME_LEGACY,
vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETSCREENREADER, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
eq( v, (BOOL)vals[i], "SPI_GETSCREENREADER", "%d" );
}
rc=SystemParametersInfoA( SPI_SETSCREENREADER, old_b, 0, SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETFONTSMOOTHING( void ) /* 75 */
@@ -2007,7 +2005,7 @@
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHING, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETFONTSMOOTHING")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETFONTSMOOTHING, 0 );
test_reg_key( SPI_SETFONTSMOOTHING_REGKEY,
SPI_SETFONTSMOOTHING_VALNAME,
@@ -2016,7 +2014,7 @@
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHINGTYPE, 0, UlongToPtr(vals[i]),
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETFONTSMOOTHINGTYPE")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETFONTSMOOTHINGTYPE, 0 );
test_reg_key_dword( SPI_SETFONTSMOOTHING_REGKEY,
SPI_SETFONTSMOOTHINGTYPE_VALNAME, &vals[i] );
@@ -2024,7 +2022,7 @@
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHINGCONTRAST, 0, UlongToPtr(vals[i]),
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETFONTSMOOTHINGCONTRAST")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETFONTSMOOTHINGCONTRAST, 0 );
test_reg_key_dword( SPI_SETFONTSMOOTHING_REGKEY,
SPI_SETFONTSMOOTHINGCONTRAST_VALNAME, &vals[i] );
@@ -2032,36 +2030,36 @@
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHINGORIENTATION, 0,
UlongToPtr(vals[i]),
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETFONTSMOOTHINGORIENTATION")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETFONTSMOOTHINGORIENTATION, 0 );
test_reg_key_dword( SPI_SETFONTSMOOTHING_REGKEY,
SPI_SETFONTSMOOTHINGORIENTATION_VALNAME, &vals[i] );
rc=SystemParametersInfoA( SPI_GETFONTSMOOTHING, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
eq( v, vals[i] ? 1 : 0, "SPI_GETFONTSMOOTHING", "%d" );
rc=SystemParametersInfoA( SPI_GETFONTSMOOTHINGTYPE, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
ok( v == vals[i], "wrong value %x/%x\n", v, vals[i] );
rc=SystemParametersInfoA( SPI_GETFONTSMOOTHINGCONTRAST, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
ok( v == vals[i], "wrong value %x/%x\n", v, vals[i] );
rc=SystemParametersInfoA( SPI_GETFONTSMOOTHINGORIENTATION, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
ok( v == vals[i], "wrong value %x/%x\n", v, vals[i] );
}
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHING, old_b, 0, SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHINGTYPE, old_type, 0, SPIF_UPDATEINIFILE
);
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHINGCONTRAST, old_contrast, 0,
SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHINGORIENTATION, old_orient, 0,
SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETLOWPOWERACTIVE( void ) /* 85 */
@@ -2084,7 +2082,7 @@
rc=SystemParametersInfoA( SPI_SETLOWPOWERACTIVE, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETLOWPOWERACTIVE")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETLOWPOWERACTIVE, 1 );
test_reg_key_optional( SPI_SETLOWPOWERACTIVE_REGKEY,
SPI_SETLOWPOWERACTIVE_VALNAME,
@@ -2093,7 +2091,7 @@
/* SPI_SETLOWPOWERACTIVE is not persistent in win2k3 and above */
v = 0xdeadbeef;
rc=SystemParametersInfoA( SPI_GETLOWPOWERACTIVE, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
ok(v == vals[i] ||
broken(v == (0xdead0000 | vals[i])) || /* win98 only sets the low word */
v == 0, /* win2k3 */
@@ -2101,7 +2099,7 @@
}
rc=SystemParametersInfoA( SPI_SETLOWPOWERACTIVE, old_b, 0, SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETPOWEROFFACTIVE( void ) /* 86 */
@@ -2124,7 +2122,7 @@
rc=SystemParametersInfoA( SPI_SETPOWEROFFACTIVE, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETPOWEROFFACTIVE")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETPOWEROFFACTIVE, 1 );
test_reg_key_optional( SPI_SETPOWEROFFACTIVE_REGKEY,
SPI_SETPOWEROFFACTIVE_VALNAME,
@@ -2133,7 +2131,7 @@
/* SPI_SETPOWEROFFACTIVE is not persistent in win2k3 and above */
v = 0xdeadbeef;
rc=SystemParametersInfoA( SPI_GETPOWEROFFACTIVE, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
ok(v == vals[i] ||
broken(v == (0xdead0000 | vals[i])) || /* win98 only sets the low word */
v == 0, /* win2k3 */
@@ -2141,7 +2139,7 @@
}
rc=SystemParametersInfoA( SPI_SETPOWEROFFACTIVE, old_b, 0, SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETSNAPTODEFBUTTON( void ) /* 95 */
@@ -2164,19 +2162,19 @@
rc=SystemParametersInfoA( SPI_SETSNAPTODEFBUTTON, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETSNAPTODEFBUTTON")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETSNAPTODEFBUTTON, 0 );
test_reg_key_optional( SPI_SETSNAPTODEFBUTTON_REGKEY,
SPI_SETSNAPTODEFBUTTON_VALNAME,
vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETSNAPTODEFBUTTON, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
eq( v, vals[i], "SPI_GETSNAPTODEFBUTTON", "%d" );
}
rc=SystemParametersInfoA( SPI_SETSNAPTODEFBUTTON, old_b, 0, SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETMOUSEHOVERWIDTH( void ) /* 99 */
@@ -2203,20 +2201,20 @@
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERWIDTH, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETMOUSEHOVERWIDTH")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETMOUSEHOVERWIDTH, 0 );
sprintf( buf, "%d", vals[i] );
test_reg_key( SPI_SETMOUSEHOVERWIDTH_REGKEY,
SPI_SETMOUSEHOVERWIDTH_VALNAME, buf );
SystemParametersInfoA( SPI_GETMOUSEHOVERWIDTH, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
eq( v, vals[i], "SPI_{GET,SET}MOUSEHOVERWIDTH", "%d" );
}
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERWIDTH, old_width, 0,
SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETMOUSEHOVERHEIGHT( void ) /* 101 */
@@ -2243,20 +2241,20 @@
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERHEIGHT, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETMOUSEHOVERHEIGHT")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETMOUSEHOVERHEIGHT, 0 );
sprintf( buf, "%d", vals[i] );
test_reg_key( SPI_SETMOUSEHOVERHEIGHT_REGKEY,
SPI_SETMOUSEHOVERHEIGHT_VALNAME, buf );
SystemParametersInfoA( SPI_GETMOUSEHOVERHEIGHT, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
eq( v, vals[i], "SPI_{GET,SET}MOUSEHOVERHEIGHT", "%d" );
}
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERHEIGHT, old_height, 0,
SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETMOUSEHOVERTIME( void ) /* 103 */
@@ -2287,20 +2285,20 @@
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERTIME, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETMOUSEHOVERTIME")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETMOUSEHOVERTIME, 0 );
sprintf( buf, "%d", vals[i] );
test_reg_key( SPI_SETMOUSEHOVERTIME_REGKEY,
SPI_SETMOUSEHOVERTIME_VALNAME, buf );
SystemParametersInfoA( SPI_GETMOUSEHOVERTIME, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
eq( v, vals[i], "SPI_{GET,SET}MOUSEHOVERTIME", "%d" );
}
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERTIME, old_time, 0,
SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETWHEELSCROLLLINES( void ) /* 105 */
@@ -2326,20 +2324,20 @@
rc=SystemParametersInfoA( SPI_SETWHEELSCROLLLINES, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETWHEELSCROLLLINES")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETWHEELSCROLLLINES, 0 );
sprintf( buf, "%d", vals[i] );
test_reg_key( SPI_SETMOUSESCROLLLINES_REGKEY,
SPI_SETMOUSESCROLLLINES_VALNAME, buf );
SystemParametersInfoA( SPI_GETWHEELSCROLLLINES, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
eq( v, vals[i], "SPI_{GET,SET}WHEELSCROLLLINES", "%d" );
}
rc=SystemParametersInfoA( SPI_SETWHEELSCROLLLINES, old_lines, 0,
SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETMENUSHOWDELAY( void ) /* 107 */
@@ -2365,20 +2363,20 @@
rc=SystemParametersInfoA( SPI_SETMENUSHOWDELAY, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETMENUSHOWDELAY")) return;
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
test_change_message( SPI_SETMENUSHOWDELAY, 0 );
sprintf( buf, "%d", vals[i] );
test_reg_key( SPI_SETMENUSHOWDELAY_REGKEY,
SPI_SETMENUSHOWDELAY_VALNAME, buf );
SystemParametersInfoA( SPI_GETMENUSHOWDELAY, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
eq( v, vals[i], "SPI_{GET,SET}MENUSHOWDELAY", "%d" );
}
rc=SystemParametersInfoA( SPI_SETMENUSHOWDELAY, old_delay, 0,
SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETWHEELSCROLLCHARS( void ) /* 108 */
@@ -2410,13 +2408,13 @@
SPI_SETMOUSESCROLLCHARS_VALNAME, buf );
SystemParametersInfoA( SPI_GETWHEELSCROLLCHARS, 0, &v, 0 );
- ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
+ ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError());
eq( v, vals[i], "SPI_{GET,SET}WHEELSCROLLCHARS", "%d" );
}
rc=SystemParametersInfoA( SPI_SETWHEELSCROLLCHARS, old_chars, 0,
SPIF_UPDATEINIFILE );
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
}
static void test_SPI_SETWALLPAPER( void ) /* 115 */
@@ -2437,11 +2435,11 @@
strcpy(newval, "");
rc=SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, newval, SPIF_UPDATEINIFILE |
SPIF_SENDCHANGE);
if (!test_error_msg(rc,"SPI_SETDESKWALLPAPER")) return;
- ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
+ ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError());
test_change_message(SPI_SETDESKWALLPAPER, 0);
rc=SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, oldval, SPIF_UPDATEINIFILE);
- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d
err=%d\n",rc,GetLastError());
+ ok(rc, "***warning*** failed to restore the original value: rc=%d
err=%d\n", rc, GetLastError());
test_reg_key(SPI_SETDESKWALLPAPER_REGKEY, SPI_SETDESKWALLPAPER_VALNAME, oldval);
}
@@ -2789,10 +2787,12 @@
screen.cx = GetSystemMetrics( SM_CXSCREEN );
screen.cy = GetSystemMetrics( SM_CYSCREEN );
}
- ok_gsm_2( SM_CXMAXTRACK, screen.cx + 4 + 2 * GetSystemMetrics(SM_CXFRAME),
- screen.cx - 4 + 2 * GetSystemMetrics(SM_CXFRAME)); /* Vista */
- ok_gsm_2( SM_CYMAXTRACK, screen.cy + 4 + 2 * GetSystemMetrics(SM_CYFRAME),
- screen.cy - 4 + 2 * GetSystemMetrics(SM_CYFRAME)); /* Vista */
+ ok_gsm_3( SM_CXMAXTRACK, screen.cx + 4 + 2 * GetSystemMetrics(SM_CXFRAME),
+ screen.cx - 4 + 2 * GetSystemMetrics(SM_CXFRAME), /* Vista */
+ screen.cx + 2 * GetSystemMetrics(SM_CXFRAME)); /* Win8 */
+ ok_gsm_3( SM_CYMAXTRACK, screen.cy + 4 + 2 * GetSystemMetrics(SM_CYFRAME),
+ screen.cy - 4 + 2 * GetSystemMetrics(SM_CYFRAME), /* Vista */
+ screen.cy + 2 * GetSystemMetrics(SM_CYFRAME)); /* Win8 */
/* the next two cannot really be tested as they depend on (application)
* toolbars */
/* SM_CXMAXIMIZED */
@@ -2866,13 +2866,14 @@
num = 1;
while (1) {
SetLastError (0xdeadbeef);
- if (!EnumDisplaySettingsA(NULL, num++, &devmode)) {
+ if (!EnumDisplaySettingsA(NULL, num, &devmode)) {
DWORD le = GetLastError();
ok(le == ERROR_NO_MORE_FILES ||
le == 0xdeadbeef, /* XP, 2003 */
- "Expected ERROR_NO_MORE_FILES or 0xdeadbeef, got %d\n", le);
+ "Expected ERROR_NO_MORE_FILES or 0xdeadbeef, got %d for %d\n",
le, num);
break;
}
+ num++;
}
}