user32/tests: Use BOOL type where appropriate.
This commit is contained in:
parent
4f6bd4911b
commit
0e37ca1478
|
@ -144,7 +144,7 @@ static int MOD_avec, MOD_hic;
|
||||||
static int MOD_odheight;
|
static int MOD_odheight;
|
||||||
static SIZE MODsizes[MOD_NRMENUS]= { {MOD_SIZE, MOD_SIZE},{MOD_SIZE, MOD_SIZE},
|
static SIZE MODsizes[MOD_NRMENUS]= { {MOD_SIZE, MOD_SIZE},{MOD_SIZE, MOD_SIZE},
|
||||||
{MOD_SIZE, MOD_SIZE},{MOD_SIZE, MOD_SIZE}};
|
{MOD_SIZE, MOD_SIZE},{MOD_SIZE, MOD_SIZE}};
|
||||||
static int MOD_GotDrawItemMsg = FALSE;
|
static BOOL MOD_GotDrawItemMsg = FALSE;
|
||||||
static int gflag_initmenupopup,
|
static int gflag_initmenupopup,
|
||||||
gflag_entermenuloop,
|
gflag_entermenuloop,
|
||||||
gflag_initmenu;
|
gflag_initmenu;
|
||||||
|
@ -652,7 +652,7 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
|
||||||
RECT rc;
|
RECT rc;
|
||||||
CHAR text_copy[16];
|
CHAR text_copy[16];
|
||||||
int hastab, expect;
|
int hastab, expect;
|
||||||
int failed = 0;
|
BOOL failed = FALSE;
|
||||||
|
|
||||||
MOD_GotDrawItemMsg = FALSE;
|
MOD_GotDrawItemMsg = FALSE;
|
||||||
mii.fMask = MIIM_FTYPE | MIIM_DATA | MIIM_STATE;
|
mii.fMask = MIIM_FTYPE | MIIM_DATA | MIIM_STATE;
|
||||||
|
@ -1203,7 +1203,7 @@ static void set_menu_item_info( int line, HMENU hmenu, BOOL ansi, UINT mask, UIN
|
||||||
|
|
||||||
static void test_menu_iteminfo( void )
|
static void test_menu_iteminfo( void )
|
||||||
{
|
{
|
||||||
int ansi = TRUE;
|
BOOL ansi = TRUE;
|
||||||
char txtA[]="wine";
|
char txtA[]="wine";
|
||||||
char initA[]="XYZ";
|
char initA[]="XYZ";
|
||||||
char emptyA[]="";
|
char emptyA[]="";
|
||||||
|
@ -2110,7 +2110,8 @@ static DWORD WINAPI test_menu_input_thread(LPVOID lpParameter)
|
||||||
/* mixed keyboard/mouse test */
|
/* mixed keyboard/mouse test */
|
||||||
for (i = 0; menu_tests[i].type != -1; i++)
|
for (i = 0; menu_tests[i].type != -1; i++)
|
||||||
{
|
{
|
||||||
int ret = TRUE, elapsed = 0;
|
BOOL ret = TRUE;
|
||||||
|
int elapsed = 0;
|
||||||
|
|
||||||
got_input = i && menu_tests[i-1].bMenuVisible;
|
got_input = i && menu_tests[i-1].bMenuVisible;
|
||||||
|
|
||||||
|
|
|
@ -1719,11 +1719,10 @@ static const struct message WmSHOWNATopInvisible[] = {
|
||||||
{ 0 }
|
{ 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
static int after_end_dialog, test_def_id;
|
static BOOL after_end_dialog, test_def_id, paint_loop_done;
|
||||||
static int sequence_cnt, sequence_size;
|
static int sequence_cnt, sequence_size;
|
||||||
static struct recvd_message* sequence;
|
static struct recvd_message* sequence;
|
||||||
static int log_all_parent_messages;
|
static int log_all_parent_messages;
|
||||||
static int paint_loop_done;
|
|
||||||
|
|
||||||
/* user32 functions */
|
/* user32 functions */
|
||||||
static HWND (WINAPI *pGetAncestor)(HWND,UINT);
|
static HWND (WINAPI *pGetAncestor)(HWND,UINT);
|
||||||
|
@ -2030,7 +2029,7 @@ static void dump_sequence(const struct message *expected, const char *context, c
|
||||||
ok_sequence_( (exp), (contx), (todo), __FILE__, __LINE__)
|
ok_sequence_( (exp), (contx), (todo), __FILE__, __LINE__)
|
||||||
|
|
||||||
|
|
||||||
static void ok_sequence_(const struct message *expected_list, const char *context, int todo,
|
static void ok_sequence_(const struct message *expected_list, const char *context, BOOL todo,
|
||||||
const char *file, int line)
|
const char *file, int line)
|
||||||
{
|
{
|
||||||
static const struct recvd_message end_of_sequence;
|
static const struct recvd_message end_of_sequence;
|
||||||
|
@ -4762,17 +4761,17 @@ static void test_messages(void)
|
||||||
|
|
||||||
flush_sequence();
|
flush_sequence();
|
||||||
|
|
||||||
test_def_id = 1;
|
test_def_id = TRUE;
|
||||||
SendMessageA(hwnd, WM_NULL, 0, 0);
|
SendMessageA(hwnd, WM_NULL, 0, 0);
|
||||||
|
|
||||||
flush_sequence();
|
flush_sequence();
|
||||||
after_end_dialog = 1;
|
after_end_dialog = TRUE;
|
||||||
EndDialog( hwnd, 0 );
|
EndDialog( hwnd, 0 );
|
||||||
ok_sequence(WmEndCustomDialogSeq, "EndCustomDialog", FALSE);
|
ok_sequence(WmEndCustomDialogSeq, "EndCustomDialog", FALSE);
|
||||||
|
|
||||||
DestroyWindow(hwnd);
|
DestroyWindow(hwnd);
|
||||||
after_end_dialog = 0;
|
after_end_dialog = FALSE;
|
||||||
test_def_id = 0;
|
test_def_id = FALSE;
|
||||||
|
|
||||||
hwnd = CreateWindowExA(0, "TestDialogClass", NULL, WS_POPUP,
|
hwnd = CreateWindowExA(0, "TestDialogClass", NULL, WS_POPUP,
|
||||||
0, 0, 100, 100, 0, 0, GetModuleHandleA(0), NULL);
|
0, 0, 100, 100, 0, 0, GetModuleHandleA(0), NULL);
|
||||||
|
@ -7886,7 +7885,7 @@ static LRESULT WINAPI PaintLoopProcA(HWND hWnd, UINT msg, WPARAM wParam, LPARAM
|
||||||
}
|
}
|
||||||
else ok(broken(1), "infinite loop\n");
|
else ok(broken(1), "infinite loop\n");
|
||||||
if ( i == 0)
|
if ( i == 0)
|
||||||
paint_loop_done = 1;
|
paint_loop_done = TRUE;
|
||||||
return DefWindowProcA(hWnd,msg,wParam,lParam);
|
return DefWindowProcA(hWnd,msg,wParam,lParam);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9040,22 +9039,22 @@ static void test_scrollwindowex(void)
|
||||||
trace("start scroll\n");
|
trace("start scroll\n");
|
||||||
ScrollWindowEx( hwnd, 10, 10, &rect, NULL, NULL, NULL,
|
ScrollWindowEx( hwnd, 10, 10, &rect, NULL, NULL, NULL,
|
||||||
SW_ERASE|SW_INVALIDATE);
|
SW_ERASE|SW_INVALIDATE);
|
||||||
ok_sequence(WmEmptySeq, "ScrollWindowEx", 0);
|
ok_sequence(WmEmptySeq, "ScrollWindowEx", FALSE);
|
||||||
trace("end scroll\n");
|
trace("end scroll\n");
|
||||||
flush_sequence();
|
flush_sequence();
|
||||||
flush_events();
|
flush_events();
|
||||||
ok_sequence(ScrollWindowPaint1, "ScrollWindowEx", 0);
|
ok_sequence(ScrollWindowPaint1, "ScrollWindowEx", FALSE);
|
||||||
flush_events();
|
flush_events();
|
||||||
flush_sequence();
|
flush_sequence();
|
||||||
|
|
||||||
/* Now without the SW_ERASE flag */
|
/* Now without the SW_ERASE flag */
|
||||||
trace("start scroll\n");
|
trace("start scroll\n");
|
||||||
ScrollWindowEx( hwnd, 10, 10, &rect, NULL, NULL, NULL, SW_INVALIDATE);
|
ScrollWindowEx( hwnd, 10, 10, &rect, NULL, NULL, NULL, SW_INVALIDATE);
|
||||||
ok_sequence(WmEmptySeq, "ScrollWindowEx", 0);
|
ok_sequence(WmEmptySeq, "ScrollWindowEx", FALSE);
|
||||||
trace("end scroll\n");
|
trace("end scroll\n");
|
||||||
flush_sequence();
|
flush_sequence();
|
||||||
flush_events();
|
flush_events();
|
||||||
ok_sequence(ScrollWindowPaint2, "ScrollWindowEx", 0);
|
ok_sequence(ScrollWindowPaint2, "ScrollWindowEx", FALSE);
|
||||||
flush_events();
|
flush_events();
|
||||||
flush_sequence();
|
flush_sequence();
|
||||||
|
|
||||||
|
@ -9069,7 +9068,7 @@ static void test_scrollwindowex(void)
|
||||||
trace("end scroll\n");
|
trace("end scroll\n");
|
||||||
flush_sequence();
|
flush_sequence();
|
||||||
flush_events();
|
flush_events();
|
||||||
ok_sequence(ScrollWindowPaint1, "ScrollWindowEx", 0);
|
ok_sequence(ScrollWindowPaint1, "ScrollWindowEx", FALSE);
|
||||||
flush_events();
|
flush_events();
|
||||||
flush_sequence();
|
flush_sequence();
|
||||||
|
|
||||||
|
@ -9079,7 +9078,7 @@ static void test_scrollwindowex(void)
|
||||||
trace("end scroll\n");
|
trace("end scroll\n");
|
||||||
flush_sequence();
|
flush_sequence();
|
||||||
flush_events();
|
flush_events();
|
||||||
ok_sequence(ScrollWindowPaint1, "ScrollWindow", 0);
|
ok_sequence(ScrollWindowPaint1, "ScrollWindow", FALSE);
|
||||||
|
|
||||||
ok(DestroyWindow(hchild), "failed to destroy window\n");
|
ok(DestroyWindow(hchild), "failed to destroy window\n");
|
||||||
ok(DestroyWindow(hwnd), "failed to destroy window\n");
|
ok(DestroyWindow(hwnd), "failed to destroy window\n");
|
||||||
|
@ -9212,7 +9211,7 @@ static void test_DestroyWindow(void)
|
||||||
ret = DestroyWindow(parent);
|
ret = DestroyWindow(parent);
|
||||||
ok( ret, "DestroyWindow() error %d\n", GetLastError());
|
ok( ret, "DestroyWindow() error %d\n", GetLastError());
|
||||||
test_DestroyWindow_flag = FALSE;
|
test_DestroyWindow_flag = FALSE;
|
||||||
ok_sequence(destroy_window_with_children, "destroy window with children", 0);
|
ok_sequence(destroy_window_with_children, "destroy window with children", FALSE);
|
||||||
|
|
||||||
ok(!IsWindow(parent), "parent still exists\n");
|
ok(!IsWindow(parent), "parent still exists\n");
|
||||||
ok(!IsWindow(child1), "child1 still exists\n");
|
ok(!IsWindow(child1), "child1 still exists\n");
|
||||||
|
@ -10229,8 +10228,7 @@ static void wait_move_event(HWND hwnd, int x, int y)
|
||||||
{
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
DWORD time;
|
DWORD time;
|
||||||
BOOL ret;
|
BOOL ret, go = FALSE;
|
||||||
int go = 0;
|
|
||||||
|
|
||||||
time = GetTickCount();
|
time = GetTickCount();
|
||||||
while (GetTickCount() - time < 200 && !go) {
|
while (GetTickCount() - time < 200 && !go) {
|
||||||
|
@ -12708,7 +12706,7 @@ static void test_paintingloop(void)
|
||||||
{
|
{
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
|
|
||||||
paint_loop_done = 0;
|
paint_loop_done = FALSE;
|
||||||
hwnd = CreateWindowExA(0x0,"PaintLoopWindowClass",
|
hwnd = CreateWindowExA(0x0,"PaintLoopWindowClass",
|
||||||
"PaintLoopWindowClass",WS_OVERLAPPEDWINDOW,
|
"PaintLoopWindowClass",WS_OVERLAPPEDWINDOW,
|
||||||
100, 100, 100, 100, 0, 0, 0, NULL );
|
100, 100, 100, 100, 0, 0, 0, NULL );
|
||||||
|
@ -12732,7 +12730,7 @@ static void test_defwinproc(void)
|
||||||
{
|
{
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
MSG msg;
|
MSG msg;
|
||||||
int gotwmquit = FALSE;
|
BOOL gotwmquit = FALSE;
|
||||||
hwnd = CreateWindowExA(0, "static", "test_defwndproc", WS_POPUP, 0,0,0,0,0,0,0, NULL);
|
hwnd = CreateWindowExA(0, "static", "test_defwndproc", WS_POPUP, 0,0,0,0,0,0,0, NULL);
|
||||||
assert(hwnd);
|
assert(hwnd);
|
||||||
DefWindowProcA( hwnd, WM_ENDSESSION, 1, 0);
|
DefWindowProcA( hwnd, WM_ENDSESSION, 1, 0);
|
||||||
|
@ -12740,7 +12738,7 @@ static void test_defwinproc(void)
|
||||||
if( msg.message == WM_QUIT) gotwmquit = TRUE;
|
if( msg.message == WM_QUIT) gotwmquit = TRUE;
|
||||||
DispatchMessageA( &msg );
|
DispatchMessageA( &msg );
|
||||||
}
|
}
|
||||||
ok( gotwmquit == FALSE, "Unexpected WM_QUIT message!\n");
|
ok(!gotwmquit, "Unexpected WM_QUIT message!\n");
|
||||||
DestroyWindow( hwnd);
|
DestroyWindow( hwnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,9 +40,9 @@
|
||||||
|
|
||||||
static LONG (WINAPI *pChangeDisplaySettingsExA)(LPCSTR, LPDEVMODEA, HWND, DWORD, LPVOID);
|
static LONG (WINAPI *pChangeDisplaySettingsExA)(LPCSTR, LPDEVMODEA, HWND, DWORD, LPVOID);
|
||||||
|
|
||||||
static int strict;
|
static BOOL strict;
|
||||||
static int dpi;
|
static int dpi;
|
||||||
static int iswin9x;
|
static BOOL iswin9x;
|
||||||
static HDC hdc;
|
static HDC hdc;
|
||||||
|
|
||||||
#define eq(received, expected, label, type) \
|
#define eq(received, expected, label, type) \
|
||||||
|
@ -529,48 +529,48 @@ static void test_SPI_SETBEEP( void ) /* 2 */
|
||||||
curr_val = TRUE;
|
curr_val = TRUE;
|
||||||
rc=SystemParametersInfoA( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
rc=SystemParametersInfoA( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETBEEP")) return;
|
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_change_message( SPI_SETBEEP, 0 );
|
||||||
test_reg_key( SPI_SETBEEP_REGKEY,
|
test_reg_key( SPI_SETBEEP_REGKEY,
|
||||||
SPI_SETBEEP_VALNAME,
|
SPI_SETBEEP_VALNAME,
|
||||||
curr_val ? "Yes" : "No" );
|
curr_val ? "Yes" : "No" );
|
||||||
rc=SystemParametersInfoA( SPI_GETBEEP, 0, &b, 0 );
|
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" );
|
eq( b, curr_val, "SPI_{GET,SET}BEEP", "%d" );
|
||||||
rc=SystemParametersInfoW( SPI_GETBEEP, 0, &b, 0 );
|
rc=SystemParametersInfoW( SPI_GETBEEP, 0, &b, 0 );
|
||||||
if (rc!=0 || GetLastError()!=ERROR_CALL_NOT_IMPLEMENTED)
|
if (rc || GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
|
||||||
{
|
{
|
||||||
ok(rc!=0,"SystemParametersInfoW: rc=%d err=%d\n",rc,GetLastError());
|
ok(rc, "SystemParametersInfoW: rc=%d err=%d\n", rc, GetLastError());
|
||||||
eq( b, curr_val, "SystemParametersInfoW", "%d" );
|
eq( b, curr_val, "SystemParametersInfoW", "%d" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* is a message sent for the second change? */
|
/* is a message sent for the second change? */
|
||||||
rc=SystemParametersInfoA( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
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 );
|
test_change_message( SPI_SETBEEP, 0 );
|
||||||
|
|
||||||
curr_val = FALSE;
|
curr_val = FALSE;
|
||||||
rc=SystemParametersInfoW( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
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 );
|
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_change_message( SPI_SETBEEP, 0 );
|
||||||
test_reg_key( SPI_SETBEEP_REGKEY,
|
test_reg_key( SPI_SETBEEP_REGKEY,
|
||||||
SPI_SETBEEP_VALNAME,
|
SPI_SETBEEP_VALNAME,
|
||||||
curr_val ? "Yes" : "No" );
|
curr_val ? "Yes" : "No" );
|
||||||
rc=SystemParametersInfoA( SPI_GETBEEP, 0, &b, 0 );
|
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" );
|
eq( b, curr_val, "SPI_{GET,SET}BEEP", "%d" );
|
||||||
rc=SystemParametersInfoW( SPI_GETBEEP, 0, &b, 0 );
|
rc=SystemParametersInfoW( SPI_GETBEEP, 0, &b, 0 );
|
||||||
if (rc!=0 || GetLastError()!=ERROR_CALL_NOT_IMPLEMENTED)
|
if (rc || GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
|
||||||
{
|
{
|
||||||
ok(rc!=0,"SystemParametersInfoW: rc=%d err=%d\n",rc,GetLastError());
|
ok(rc, "SystemParametersInfoW: rc=%d err=%d\n", rc, GetLastError());
|
||||||
eq( b, curr_val, "SystemParametersInfoW", "%d" );
|
eq( b, curr_val, "SystemParametersInfoW", "%d" );
|
||||||
}
|
}
|
||||||
ok( MessageBeep( MB_OK ), "Return value of MessageBeep when sound is disabled\n" );
|
ok( MessageBeep( MB_OK ), "Return value of MessageBeep when sound is disabled\n" );
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETBEEP, old_b, 0, SPIF_UPDATEINIFILE );
|
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] = {
|
static const char *setmouse_valuenames[3] = {
|
||||||
|
@ -587,21 +587,21 @@ static BOOL run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro
|
||||||
BOOL rc;
|
BOOL rc;
|
||||||
INT mi[3];
|
INT mi[3];
|
||||||
static int aw_turn = 0;
|
static int aw_turn = 0;
|
||||||
static BOOL w_implemented = 1;
|
static BOOL w_implemented = TRUE;
|
||||||
|
|
||||||
char buf[20];
|
char buf[20];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
aw_turn++;
|
aw_turn++;
|
||||||
rc=0;
|
rc = FALSE;
|
||||||
if ((aw_turn % 2!=0) && (w_implemented))
|
if ((aw_turn % 2!=0) && (w_implemented))
|
||||||
{
|
{
|
||||||
/* call unicode on odd (non even) calls */
|
/* call unicode on odd (non even) calls */
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
rc=SystemParametersInfoW( SPI_SETMOUSE, 0, curr_val, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
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");
|
trace("SystemParametersInfoW not supported on this platform\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -613,7 +613,7 @@ static BOOL run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro
|
||||||
}
|
}
|
||||||
if (!test_error_msg(rc,"SPI_SETMOUSE")) return FALSE;
|
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 );
|
test_change_message( SPI_SETMOUSE, 0 );
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
|
@ -622,7 +622,7 @@ static BOOL run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_GETMOUSE, 0, mi, 0 );
|
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++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
ok(mi[i] == curr_val[i],
|
ok(mi[i] == curr_val[i],
|
||||||
|
@ -632,7 +632,7 @@ static BOOL run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro
|
||||||
if (w_implemented)
|
if (w_implemented)
|
||||||
{
|
{
|
||||||
rc=SystemParametersInfoW( SPI_GETMOUSE, 0, mi, 0 );
|
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++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
ok(mi[i] == curr_val[i],
|
ok(mi[i] == curr_val[i],
|
||||||
|
@ -717,7 +717,7 @@ static void test_SPI_SETMOUSE( void ) /* 4 */
|
||||||
run_spi_setmouse_test( curr_val, req_change, proj_change8, nchange );
|
run_spi_setmouse_test( curr_val, req_change, proj_change8, nchange );
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETMOUSE, 0, old_mi, SPIF_UPDATEINIFILE );
|
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)
|
static BOOL test_setborder(UINT curr_val, int usesetborder, int dpi)
|
||||||
|
@ -729,18 +729,18 @@ static BOOL test_setborder(UINT curr_val, int usesetborder, int dpi)
|
||||||
|
|
||||||
ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICSA, iPaddedBorderWidth);
|
ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICSA, iPaddedBorderWidth);
|
||||||
rc=SystemParametersInfoA( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
|
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) {
|
if( usesetborder) {
|
||||||
rc=SystemParametersInfoA( SPI_SETBORDER, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
rc=SystemParametersInfoA( SPI_SETBORDER, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETBORDER")) return FALSE;
|
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 );
|
test_change_message( SPI_SETBORDER, 1 );
|
||||||
} else { /* set non client metrics */
|
} else { /* set non client metrics */
|
||||||
ncm.iBorderWidth = curr_val;
|
ncm.iBorderWidth = curr_val;
|
||||||
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &ncm, SPIF_UPDATEINIFILE|
|
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &ncm, SPIF_UPDATEINIFILE|
|
||||||
SPIF_SENDCHANGE);
|
SPIF_SENDCHANGE);
|
||||||
if (!test_error_msg(rc,"SPI_SETNONCLIENTMETRICS")) return FALSE;
|
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 );
|
test_change_message( SPI_SETNONCLIENTMETRICS, 1 );
|
||||||
}
|
}
|
||||||
if( curr_val) { /* skip if 0, some windows versions return 0 others 1 */
|
if( curr_val) { /* skip if 0, some windows versions return 0 others 1 */
|
||||||
|
@ -753,11 +753,11 @@ static BOOL test_setborder(UINT curr_val, int usesetborder, int dpi)
|
||||||
if (curr_val == 0) curr_val = 1;
|
if (curr_val == 0) curr_val = 1;
|
||||||
/* should be the same as the non client metrics */
|
/* should be the same as the non client metrics */
|
||||||
rc=SystemParametersInfoA( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
|
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");
|
eq( (UINT)ncm.iBorderWidth, curr_val, "NonClientMetric.iBorderWidth", "%d");
|
||||||
/* and from SPI_GETBORDER */
|
/* and from SPI_GETBORDER */
|
||||||
rc=SystemParametersInfoA( SPI_GETBORDER, 0, &border, 0 );
|
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");
|
eq( border, curr_val, "SPI_{GET,SET}BORDER", "%d");
|
||||||
/* test some SystemMetrics */
|
/* test some SystemMetrics */
|
||||||
frame = curr_val + GetSystemMetrics( SM_CXDLGFRAME );
|
frame = curr_val + GetSystemMetrics( SM_CXDLGFRAME );
|
||||||
|
@ -829,8 +829,7 @@ static void test_SPI_SETBORDER( void ) /* 6 */
|
||||||
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &ncmsave,
|
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &ncmsave,
|
||||||
SPIF_UPDATEINIFILE| SPIF_SENDCHANGE);
|
SPIF_UPDATEINIFILE| SPIF_SENDCHANGE);
|
||||||
test_change_message( SPI_SETNONCLIENTMETRICS, 1 );
|
test_change_message( SPI_SETNONCLIENTMETRICS, 1 );
|
||||||
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",
|
ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError());
|
||||||
rc,GetLastError());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_SPI_SETKEYBOARDSPEED( void ) /* 10 */
|
static void test_SPI_SETKEYBOARDSPEED( void ) /* 10 */
|
||||||
|
@ -854,18 +853,18 @@ static void test_SPI_SETKEYBOARDSPEED( void ) /* 10 */
|
||||||
rc=SystemParametersInfoA( SPI_SETKEYBOARDSPEED, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETKEYBOARDSPEED, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETKEYBOARDSPEED")) return;
|
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 );
|
test_change_message( SPI_SETKEYBOARDSPEED, 0 );
|
||||||
sprintf( buf, "%d", vals[i] );
|
sprintf( buf, "%d", vals[i] );
|
||||||
test_reg_key( SPI_SETKEYBOARDSPEED_REGKEY, SPI_SETKEYBOARDSPEED_VALNAME, buf );
|
test_reg_key( SPI_SETKEYBOARDSPEED_REGKEY, SPI_SETKEYBOARDSPEED_VALNAME, buf );
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_GETKEYBOARDSPEED, 0, &v, 0 );
|
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" );
|
eq( v, vals[i], "SPI_{GET,SET}KEYBOARDSPEED", "%d" );
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETKEYBOARDSPEED, old_speed, 0, SPIF_UPDATEINIFILE );
|
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 */
|
/* test_SPI_ICONHORIZONTALSPACING helper */
|
||||||
|
@ -878,7 +877,7 @@ static BOOL dotest_spi_iconhorizontalspacing( INT curr_val)
|
||||||
rc=SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, curr_val, 0,
|
rc=SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, curr_val, 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
|
||||||
if (!test_error_msg(rc,"SPI_ICONHORIZONTALSPACING")) return FALSE;
|
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 );
|
test_change_message( SPI_ICONHORIZONTALSPACING, 0 );
|
||||||
if( curr_val < 32) curr_val = 32;
|
if( curr_val < 32) curr_val = 32;
|
||||||
/* The registry keys depend on the Windows version and the values too
|
/* The registry keys depend on the Windows version and the values too
|
||||||
|
@ -891,14 +890,14 @@ static BOOL dotest_spi_iconhorizontalspacing( INT curr_val)
|
||||||
"wrong value in registry %d, expected %d\n", regval, curr_val);
|
"wrong value in registry %d, expected %d\n", regval, curr_val);
|
||||||
/* compare with what SPI_ICONHORIZONTALSPACING returns */
|
/* compare with what SPI_ICONHORIZONTALSPACING returns */
|
||||||
rc=SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, 0, &spacing, 0 );
|
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");
|
eq( spacing, curr_val, "ICONHORIZONTALSPACING", "%d");
|
||||||
/* and with a system metrics */
|
/* and with a system metrics */
|
||||||
eq( GetSystemMetrics( SM_CXICONSPACING ), curr_val, "SM_CXICONSPACING", "%d" );
|
eq( GetSystemMetrics( SM_CXICONSPACING ), curr_val, "SM_CXICONSPACING", "%d" );
|
||||||
/* and with what SPI_GETICONMETRICS returns */
|
/* and with what SPI_GETICONMETRICS returns */
|
||||||
im.cbSize = sizeof(ICONMETRICSA);
|
im.cbSize = sizeof(ICONMETRICSA);
|
||||||
rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im, FALSE );
|
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" );
|
eq( im.iHorzSpacing, curr_val, "SPI_GETICONMETRICS", "%d" );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -919,7 +918,7 @@ static void test_SPI_ICONHORIZONTALSPACING( void ) /* 13 */
|
||||||
dotest_spi_iconhorizontalspacing( 10); /* minimum is 32 */
|
dotest_spi_iconhorizontalspacing( 10); /* minimum is 32 */
|
||||||
/* restore */
|
/* restore */
|
||||||
rc=SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, old_spacing, 0, SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETSCREENSAVETIMEOUT( void ) /* 14 */
|
||||||
|
@ -943,20 +942,20 @@ static void test_SPI_SETSCREENSAVETIMEOUT( void ) /* 14 */
|
||||||
rc=SystemParametersInfoA( SPI_SETSCREENSAVETIMEOUT, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETSCREENSAVETIMEOUT, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETSCREENSAVETIMEOUT")) return;
|
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 );
|
test_change_message( SPI_SETSCREENSAVETIMEOUT, 0 );
|
||||||
sprintf( buf, "%d", vals[i] );
|
sprintf( buf, "%d", vals[i] );
|
||||||
test_reg_key( SPI_SETSCREENSAVETIMEOUT_REGKEY,
|
test_reg_key( SPI_SETSCREENSAVETIMEOUT_REGKEY,
|
||||||
SPI_SETSCREENSAVETIMEOUT_VALNAME, buf );
|
SPI_SETSCREENSAVETIMEOUT_VALNAME, buf );
|
||||||
|
|
||||||
rc = SystemParametersInfoA( SPI_GETSCREENSAVETIMEOUT, 0, &v, 0 );
|
rc = SystemParametersInfoA( SPI_GETSCREENSAVETIMEOUT, 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}SCREENSAVETIMEOUT", "%d" );
|
eq( v, vals[i], "SPI_{GET,SET}SCREENSAVETIMEOUT", "%d" );
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETSCREENSAVETIMEOUT, old_timeout, 0,
|
rc=SystemParametersInfoA( SPI_SETSCREENSAVETIMEOUT, old_timeout, 0,
|
||||||
SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETSCREENSAVEACTIVE( void ) /* 17 */
|
||||||
|
@ -979,20 +978,20 @@ static void test_SPI_SETSCREENSAVEACTIVE( void ) /* 17 */
|
||||||
rc=SystemParametersInfoA( SPI_SETSCREENSAVEACTIVE, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETSCREENSAVEACTIVE, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETSCREENSAVEACTIVE")) return;
|
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_change_message( SPI_SETSCREENSAVEACTIVE, 0 );
|
||||||
test_reg_key( SPI_SETSCREENSAVEACTIVE_REGKEY,
|
test_reg_key( SPI_SETSCREENSAVEACTIVE_REGKEY,
|
||||||
SPI_SETSCREENSAVEACTIVE_VALNAME,
|
SPI_SETSCREENSAVEACTIVE_VALNAME,
|
||||||
vals[i] ? "1" : "0" );
|
vals[i] ? "1" : "0" );
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_GETSCREENSAVEACTIVE, 0, &v, 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 */,
|
ok(v == vals[i] || broken(! v) /* Win 7 */,
|
||||||
"SPI_{GET,SET}SCREENSAVEACTIVE: got %d instead of %d\n", v, vals[i]);
|
"SPI_{GET,SET}SCREENSAVEACTIVE: got %d instead of %d\n", v, vals[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETSCREENSAVEACTIVE, old_b, 0, SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETGRIDGRANULARITY( void ) /* 19 */
|
||||||
|
@ -1021,19 +1020,19 @@ static void test_SPI_SETKEYBOARDDELAY( void ) /* 23 */
|
||||||
rc=SystemParametersInfoA( SPI_SETKEYBOARDDELAY, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETKEYBOARDDELAY, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETKEYBOARDDELAY")) return;
|
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 );
|
test_change_message( SPI_SETKEYBOARDDELAY, 0 );
|
||||||
sprintf( buf, "%d", vals[i] );
|
sprintf( buf, "%d", vals[i] );
|
||||||
test_reg_key( SPI_SETKEYBOARDDELAY_REGKEY,
|
test_reg_key( SPI_SETKEYBOARDDELAY_REGKEY,
|
||||||
SPI_SETKEYBOARDDELAY_VALNAME, buf );
|
SPI_SETKEYBOARDDELAY_VALNAME, buf );
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_GETKEYBOARDDELAY, 0, &delay, 0 );
|
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" );
|
eq( delay, vals[i], "SPI_{GET,SET}KEYBOARDDELAY", "%d" );
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETKEYBOARDDELAY, old_delay, 0, SPIF_UPDATEINIFILE );
|
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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1047,7 +1046,7 @@ static BOOL dotest_spi_iconverticalspacing( INT curr_val)
|
||||||
rc=SystemParametersInfoA( SPI_ICONVERTICALSPACING, curr_val, 0,
|
rc=SystemParametersInfoA( SPI_ICONVERTICALSPACING, curr_val, 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
|
||||||
if (!test_error_msg(rc,"SPI_ICONVERTICALSPACING")) return FALSE;
|
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 );
|
test_change_message( SPI_ICONVERTICALSPACING, 0 );
|
||||||
if( curr_val < 32) curr_val = 32;
|
if( curr_val < 32) curr_val = 32;
|
||||||
/* The registry keys depend on the Windows version and the values too
|
/* The registry keys depend on the Windows version and the values too
|
||||||
|
@ -1060,14 +1059,14 @@ static BOOL dotest_spi_iconverticalspacing( INT curr_val)
|
||||||
"wrong value in registry %d, expected %d\n", regval, curr_val);
|
"wrong value in registry %d, expected %d\n", regval, curr_val);
|
||||||
/* compare with what SPI_ICONVERTICALSPACING returns */
|
/* compare with what SPI_ICONVERTICALSPACING returns */
|
||||||
rc=SystemParametersInfoA( SPI_ICONVERTICALSPACING, 0, &spacing, 0 );
|
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" );
|
eq( spacing, curr_val, "ICONVERTICALSPACING", "%d" );
|
||||||
/* and with a system metrics */
|
/* and with a system metrics */
|
||||||
eq( GetSystemMetrics( SM_CYICONSPACING ), curr_val, "SM_CYICONSPACING", "%d" );
|
eq( GetSystemMetrics( SM_CYICONSPACING ), curr_val, "SM_CYICONSPACING", "%d" );
|
||||||
/* and with what SPI_GETICONMETRICS returns */
|
/* and with what SPI_GETICONMETRICS returns */
|
||||||
im.cbSize = sizeof(ICONMETRICSA);
|
im.cbSize = sizeof(ICONMETRICSA);
|
||||||
rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im, FALSE );
|
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" );
|
eq( im.iVertSpacing, curr_val, "SPI_GETICONMETRICS", "%d" );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1090,8 +1089,7 @@ static void test_SPI_ICONVERTICALSPACING( void ) /* 24 */
|
||||||
/* restore */
|
/* restore */
|
||||||
rc=SystemParametersInfoA( SPI_ICONVERTICALSPACING, old_spacing, 0,
|
rc=SystemParametersInfoA( SPI_ICONVERTICALSPACING, old_spacing, 0,
|
||||||
SPIF_UPDATEINIFILE );
|
SPIF_UPDATEINIFILE );
|
||||||
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",
|
ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError());
|
||||||
rc,GetLastError());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_SPI_SETICONTITLEWRAP( void ) /* 26 */
|
static void test_SPI_SETICONTITLEWRAP( void ) /* 26 */
|
||||||
|
@ -1123,7 +1121,7 @@ static void test_SPI_SETICONTITLEWRAP( void ) /* 26 */
|
||||||
rc=SystemParametersInfoA( SPI_SETICONTITLEWRAP, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETICONTITLEWRAP, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETICONTITLEWRAP")) return;
|
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 );
|
test_change_message( SPI_SETICONTITLEWRAP, 1 );
|
||||||
regval = metricfromreg( SPI_SETICONTITLEWRAP_REGKEY2,
|
regval = metricfromreg( SPI_SETICONTITLEWRAP_REGKEY2,
|
||||||
SPI_SETICONTITLEWRAP_VALNAME, dpi);
|
SPI_SETICONTITLEWRAP_VALNAME, dpi);
|
||||||
|
@ -1134,17 +1132,17 @@ static void test_SPI_SETICONTITLEWRAP( void ) /* 26 */
|
||||||
"wrong value in registry %d, expected %d\n", regval, vals[i] );
|
"wrong value in registry %d, expected %d\n", regval, vals[i] );
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_GETICONTITLEWRAP, 0, &v, 0 );
|
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" );
|
eq( v, vals[i], "SPI_{GET,SET}ICONTITLEWRAP", "%d" );
|
||||||
/* and test with what SPI_GETICONMETRICS returns */
|
/* and test with what SPI_GETICONMETRICS returns */
|
||||||
im.cbSize = sizeof(ICONMETRICSA);
|
im.cbSize = sizeof(ICONMETRICSA);
|
||||||
rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im, FALSE );
|
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" );
|
eq( im.iTitleWrap, (BOOL)vals[i], "SPI_GETICONMETRICS", "%d" );
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETICONTITLEWRAP, old_b, 0, SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */
|
||||||
|
@ -1167,7 +1165,7 @@ static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */
|
||||||
rc=SystemParametersInfoA( SPI_SETMENUDROPALIGNMENT, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETMENUDROPALIGNMENT, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETMENUDROPALIGNMENT")) return;
|
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_change_message( SPI_SETMENUDROPALIGNMENT, 0 );
|
||||||
test_reg_key_ex( SPI_SETMENUDROPALIGNMENT_REGKEY1,
|
test_reg_key_ex( SPI_SETMENUDROPALIGNMENT_REGKEY1,
|
||||||
SPI_SETMENUDROPALIGNMENT_REGKEY2,
|
SPI_SETMENUDROPALIGNMENT_REGKEY2,
|
||||||
|
@ -1175,7 +1173,7 @@ static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */
|
||||||
vals[i] ? "1" : "0" );
|
vals[i] ? "1" : "0" );
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_GETMENUDROPALIGNMENT, 0, &v, 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( v, vals[i], "SPI_{GET,SET}MENUDROPALIGNMENT", "%d" );
|
||||||
eq( GetSystemMetrics( SM_MENUDROPALIGNMENT ), (int)vals[i],
|
eq( GetSystemMetrics( SM_MENUDROPALIGNMENT ), (int)vals[i],
|
||||||
"SM_MENUDROPALIGNMENT", "%d" );
|
"SM_MENUDROPALIGNMENT", "%d" );
|
||||||
|
@ -1183,7 +1181,7 @@ static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETMENUDROPALIGNMENT, old_b, 0,
|
rc=SystemParametersInfoA( SPI_SETMENUDROPALIGNMENT, old_b, 0,
|
||||||
SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETDOUBLECLKWIDTH( void ) /* 29 */
|
||||||
|
@ -1217,7 +1215,7 @@ static void test_SPI_SETDOUBLECLKWIDTH( void ) /* 29 */
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETDOUBLECLKWIDTH, old_width, 0,
|
rc=SystemParametersInfoA( SPI_SETDOUBLECLKWIDTH, old_width, 0,
|
||||||
SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETDOUBLECLKHEIGHT( void ) /* 30 */
|
||||||
|
@ -1251,7 +1249,7 @@ static void test_SPI_SETDOUBLECLKHEIGHT( void ) /* 30 */
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETDOUBLECLKHEIGHT, old_height, 0,
|
rc=SystemParametersInfoA( SPI_SETDOUBLECLKHEIGHT, old_height, 0,
|
||||||
SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETDOUBLECLICKTIME( void ) /* 32 */
|
||||||
|
@ -1282,7 +1280,7 @@ static void test_SPI_SETDOUBLECLICKTIME( void ) /* 32 */
|
||||||
curr_val = 1000;
|
curr_val = 1000;
|
||||||
rc=SystemParametersInfoA( SPI_SETDOUBLECLICKTIME, curr_val, 0,
|
rc=SystemParametersInfoA( SPI_SETDOUBLECLICKTIME, curr_val, 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
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 );
|
test_change_message( SPI_SETDOUBLECLICKTIME, 0 );
|
||||||
sprintf( buf, "%d", curr_val );
|
sprintf( buf, "%d", curr_val );
|
||||||
test_reg_key( SPI_SETDOUBLECLICKTIME_REGKEY,
|
test_reg_key( SPI_SETDOUBLECLICKTIME_REGKEY,
|
||||||
|
@ -1307,7 +1305,7 @@ static void test_SPI_SETDOUBLECLICKTIME( void ) /* 32 */
|
||||||
eq( GetDoubleClickTime(), curr_val, "GetDoubleClickTime", "%d" );
|
eq( GetDoubleClickTime(), curr_val, "GetDoubleClickTime", "%d" );
|
||||||
|
|
||||||
rc=SystemParametersInfoA(SPI_SETDOUBLECLICKTIME, old_time, 0, SPIF_UPDATEINIFILE);
|
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 */
|
static void test_SPI_SETMOUSEBUTTONSWAP( void ) /* 33 */
|
||||||
|
@ -1341,7 +1339,7 @@ static void test_SPI_SETMOUSEBUTTONSWAP( void ) /* 33 */
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETMOUSEBUTTONSWAP, old_b, 0,
|
rc=SystemParametersInfoA( SPI_SETMOUSEBUTTONSWAP, old_b, 0,
|
||||||
SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETFASTTASKSWITCH( void ) /* 36 */
|
||||||
|
@ -1382,19 +1380,19 @@ static void test_SPI_SETDRAGFULLWINDOWS( void ) /* 37 */
|
||||||
rc=SystemParametersInfoA( SPI_SETDRAGFULLWINDOWS, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETDRAGFULLWINDOWS, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETDRAGFULLWINDOWS")) return;
|
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_change_message( SPI_SETDRAGFULLWINDOWS, 0 );
|
||||||
test_reg_key( SPI_SETDRAGFULLWINDOWS_REGKEY,
|
test_reg_key( SPI_SETDRAGFULLWINDOWS_REGKEY,
|
||||||
SPI_SETDRAGFULLWINDOWS_VALNAME,
|
SPI_SETDRAGFULLWINDOWS_VALNAME,
|
||||||
vals[i] ? "1" : "0" );
|
vals[i] ? "1" : "0" );
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_GETDRAGFULLWINDOWS, 0, &v, 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" );
|
eq( v, vals[i], "SPI_{GET,SET}DRAGFULLWINDOWS", "%d" );
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETDRAGFULLWINDOWS, old_b, 0, SPIF_UPDATEINIFILE );
|
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) \
|
#define test_reg_metric( KEY, VAL, val) \
|
||||||
|
@ -1513,11 +1511,11 @@ static void test_SPI_SETNONCLIENTMETRICS( void ) /* 44 */
|
||||||
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &Ncmnew, SPIF_UPDATEINIFILE|
|
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &Ncmnew, SPIF_UPDATEINIFILE|
|
||||||
SPIF_SENDCHANGE);
|
SPIF_SENDCHANGE);
|
||||||
if (!test_error_msg(rc,"SPI_SETNONCLIENTMETRICS")) return;
|
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 );
|
test_change_message( SPI_SETNONCLIENTMETRICS, 1 );
|
||||||
/* get them back */
|
/* get them back */
|
||||||
rc=SystemParametersInfoA( SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSA), &Ncmcur, FALSE );
|
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 registry entries */
|
||||||
TEST_NONCLIENTMETRICS_REG( Ncmcur)
|
TEST_NONCLIENTMETRICS_REG( Ncmcur)
|
||||||
/* test the system metrics with these settings */
|
/* test the system metrics with these settings */
|
||||||
|
@ -1536,13 +1534,13 @@ static void test_SPI_SETNONCLIENTMETRICS( void ) /* 44 */
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &Ncmnew, SPIF_UPDATEINIFILE|
|
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &Ncmnew, SPIF_UPDATEINIFILE|
|
||||||
SPIF_SENDCHANGE);
|
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 );
|
test_change_message( SPI_SETNONCLIENTMETRICS, 1 );
|
||||||
/* raw values are in registry */
|
/* raw values are in registry */
|
||||||
TEST_NONCLIENTMETRICS_REG( Ncmnew)
|
TEST_NONCLIENTMETRICS_REG( Ncmnew)
|
||||||
/* get them back */
|
/* get them back */
|
||||||
rc=SystemParametersInfoA( SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSA), &Ncmcur, FALSE );
|
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 */
|
/* cooked values are returned */
|
||||||
expect = max( Ncmnew.iMenuHeight, 2 + get_tmheight( &Ncmnew.lfMenuFont, 1));
|
expect = max( Ncmnew.iMenuHeight, 2 + get_tmheight( &Ncmnew.lfMenuFont, 1));
|
||||||
ok( Ncmcur.iMenuHeight == expect,
|
ok( Ncmcur.iMenuHeight == expect,
|
||||||
|
@ -1568,7 +1566,7 @@ static void test_SPI_SETNONCLIENTMETRICS( void ) /* 44 */
|
||||||
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSA),
|
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSA),
|
||||||
&Ncmorig, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
|
&Ncmorig, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
|
||||||
test_change_message( SPI_SETNONCLIENTMETRICS, 0 );
|
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 the system metrics with these settings */
|
||||||
test_GetSystemMetrics();
|
test_GetSystemMetrics();
|
||||||
}
|
}
|
||||||
|
@ -1613,10 +1611,10 @@ static void test_SPI_SETMINIMIZEDMETRICS( void ) /* 44 */
|
||||||
rc=SystemParametersInfoA( SPI_SETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS),
|
rc=SystemParametersInfoA( SPI_SETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS),
|
||||||
&lpMm_cur, SPIF_UPDATEINIFILE );
|
&lpMm_cur, SPIF_UPDATEINIFILE );
|
||||||
if (!test_error_msg(rc,"SPI_SETMINIMIZEDMETRICS")) return;
|
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 */
|
/* read them back */
|
||||||
rc=SystemParametersInfoA( SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), &lpMm_new, FALSE );
|
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 */
|
/* and compare */
|
||||||
eq( lpMm_new.iWidth, lpMm_cur.iWidth, "iWidth", "%d" );
|
eq( lpMm_new.iWidth, lpMm_cur.iWidth, "iWidth", "%d" );
|
||||||
eq( lpMm_new.iHorzGap, lpMm_cur.iHorzGap, "iHorzGap", "%d" );
|
eq( lpMm_new.iHorzGap, lpMm_cur.iHorzGap, "iHorzGap", "%d" );
|
||||||
|
@ -1651,10 +1649,10 @@ static void test_SPI_SETMINIMIZEDMETRICS( void ) /* 44 */
|
||||||
lpMm_cur.iArrange = - 1;
|
lpMm_cur.iArrange = - 1;
|
||||||
rc=SystemParametersInfoA( SPI_SETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS),
|
rc=SystemParametersInfoA( SPI_SETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS),
|
||||||
&lpMm_cur, SPIF_UPDATEINIFILE );
|
&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 */
|
/* read back */
|
||||||
rc=SystemParametersInfoA( SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), &lpMm_new, FALSE );
|
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 */
|
/* 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.iWidth, 0, "iWidth", "%d" );
|
||||||
eq( lpMm_new.iHorzGap, 0, "iHorzGap", "%d" );
|
eq( lpMm_new.iHorzGap, 0, "iHorzGap", "%d" );
|
||||||
|
@ -1689,10 +1687,10 @@ static void test_SPI_SETMINIMIZEDMETRICS( void ) /* 44 */
|
||||||
/* restore */
|
/* restore */
|
||||||
rc=SystemParametersInfoA( SPI_SETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS),
|
rc=SystemParametersInfoA( SPI_SETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS),
|
||||||
&lpMm_orig, SPIF_UPDATEINIFILE );
|
&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 */
|
/* check that */
|
||||||
rc=SystemParametersInfoA( SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), &lpMm_new, FALSE );
|
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.iWidth, lpMm_orig.iWidth, "iWidth", "%d" );
|
||||||
eq( lpMm_new.iHorzGap, lpMm_orig.iHorzGap, "iHorzGap", "%d" );
|
eq( lpMm_new.iHorzGap, lpMm_orig.iHorzGap, "iHorzGap", "%d" );
|
||||||
eq( lpMm_new.iVertGap, lpMm_orig.iVertGap, "iVertGap", "%d" );
|
eq( lpMm_new.iVertGap, lpMm_orig.iVertGap, "iVertGap", "%d" );
|
||||||
|
@ -1756,10 +1754,10 @@ static void test_SPI_SETICONMETRICS( void ) /* 46 */
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETICONMETRICS, sizeof(ICONMETRICSA), &im_cur, SPIF_UPDATEINIFILE );
|
rc=SystemParametersInfoA( SPI_SETICONMETRICS, sizeof(ICONMETRICSA), &im_cur, SPIF_UPDATEINIFILE );
|
||||||
if (!test_error_msg(rc,"SPI_SETICONMETRICS")) return;
|
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 );
|
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 */
|
/* test GET <-> SETICONMETRICS */
|
||||||
eq( im_new.iHorzSpacing, im_cur.iHorzSpacing, "iHorzSpacing", "%d" );
|
eq( im_new.iHorzSpacing, im_cur.iHorzSpacing, "iHorzSpacing", "%d" );
|
||||||
eq( im_new.iVertSpacing, im_cur.iVertSpacing, "iVertSpacing", "%d" );
|
eq( im_new.iVertSpacing, im_cur.iVertSpacing, "iVertSpacing", "%d" );
|
||||||
|
@ -1808,11 +1806,11 @@ static void test_SPI_SETICONMETRICS( void ) /* 46 */
|
||||||
wrap, im_cur.iTitleWrap);
|
wrap, im_cur.iTitleWrap);
|
||||||
/* restore old values */
|
/* restore old values */
|
||||||
rc=SystemParametersInfoA( SPI_SETICONMETRICS, sizeof(ICONMETRICSA), &im_orig,SPIF_UPDATEINIFILE );
|
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 );
|
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.iHorzSpacing, im_orig.iHorzSpacing, "iHorzSpacing", "%d" );
|
||||||
eq( im_new.iVertSpacing, im_orig.iVertSpacing, "iVertSpacing", "%d" );
|
eq( im_new.iVertSpacing, im_orig.iVertSpacing, "iVertSpacing", "%d" );
|
||||||
eq( im_new.iTitleWrap, im_orig.iTitleWrap, "iTitleWrap", "%d" );
|
eq( im_new.iTitleWrap, im_orig.iTitleWrap, "iTitleWrap", "%d" );
|
||||||
|
@ -1844,9 +1842,9 @@ static void test_SPI_SETWORKAREA( void ) /* 47 */
|
||||||
rc=SystemParametersInfoA( SPI_SETWORKAREA, 0, &curr_val,
|
rc=SystemParametersInfoA( SPI_SETWORKAREA, 0, &curr_val,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETWORKAREA")) return;
|
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 );
|
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 */
|
if( !EqualRect( &area, &curr_val)) /* no message if rect has not changed */
|
||||||
test_change_message( SPI_SETWORKAREA, 0);
|
test_change_message( SPI_SETWORKAREA, 0);
|
||||||
eq( area.left, curr_val.left, "left", "%d" );
|
eq( area.left, curr_val.left, "left", "%d" );
|
||||||
|
@ -1859,9 +1857,9 @@ static void test_SPI_SETWORKAREA( void ) /* 47 */
|
||||||
curr_val = area;
|
curr_val = area;
|
||||||
rc=SystemParametersInfoA( SPI_SETWORKAREA, 0, &old_area,
|
rc=SystemParametersInfoA( SPI_SETWORKAREA, 0, &old_area,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
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 );
|
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 */
|
if( !EqualRect( &area, &curr_val)) /* no message if rect has not changed */
|
||||||
test_change_message( SPI_SETWORKAREA, 0 );
|
test_change_message( SPI_SETWORKAREA, 0 );
|
||||||
eq( area.left, old_area.left, "left", "%d" );
|
eq( area.left, old_area.left, "left", "%d" );
|
||||||
|
@ -1894,21 +1892,21 @@ static void test_SPI_SETSHOWSOUNDS( void ) /* 57 */
|
||||||
rc=SystemParametersInfoA( SPI_SETSHOWSOUNDS, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETSHOWSOUNDS, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETSHOWSOUNDS")) return;
|
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_change_message( SPI_SETSHOWSOUNDS, 1 );
|
||||||
test_reg_key( SPI_SETSHOWSOUNDS_REGKEY,
|
test_reg_key( SPI_SETSHOWSOUNDS_REGKEY,
|
||||||
SPI_SETSHOWSOUNDS_VALNAME,
|
SPI_SETSHOWSOUNDS_VALNAME,
|
||||||
vals[i] ? "1" : "0" );
|
vals[i] ? "1" : "0" );
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_GETSHOWSOUNDS, 0, &v, 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( v, vals[i], "SPI_GETSHOWSOUNDS", "%d" );
|
||||||
eq( GetSystemMetrics( SM_SHOWSOUNDS ), (int)vals[i],
|
eq( GetSystemMetrics( SM_SHOWSOUNDS ), (int)vals[i],
|
||||||
"SM_SHOWSOUNDS", "%d" );
|
"SM_SHOWSOUNDS", "%d" );
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETSHOWSOUNDS, old_b, 0, SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETKEYBOARDPREF( void ) /* 69 */
|
||||||
|
@ -1931,19 +1929,19 @@ static void test_SPI_SETKEYBOARDPREF( void ) /* 69 */
|
||||||
rc=SystemParametersInfoA( SPI_SETKEYBOARDPREF, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETKEYBOARDPREF, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETKEYBOARDPREF")) return;
|
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_change_message( SPI_SETKEYBOARDPREF, 1 );
|
||||||
test_reg_key_ex2( SPI_SETKEYBOARDPREF_REGKEY, SPI_SETKEYBOARDPREF_REGKEY_LEGACY,
|
test_reg_key_ex2( SPI_SETKEYBOARDPREF_REGKEY, SPI_SETKEYBOARDPREF_REGKEY_LEGACY,
|
||||||
SPI_SETKEYBOARDPREF_VALNAME, SPI_SETKEYBOARDPREF_VALNAME_LEGACY,
|
SPI_SETKEYBOARDPREF_VALNAME, SPI_SETKEYBOARDPREF_VALNAME_LEGACY,
|
||||||
vals[i] ? "1" : "0" );
|
vals[i] ? "1" : "0" );
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_GETKEYBOARDPREF, 0, &v, 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" );
|
eq( v, (BOOL)vals[i], "SPI_GETKEYBOARDPREF", "%d" );
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETKEYBOARDPREF, old_b, 0, SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETSCREENREADER( void ) /* 71 */
|
||||||
|
@ -1966,19 +1964,19 @@ static void test_SPI_SETSCREENREADER( void ) /* 71 */
|
||||||
rc=SystemParametersInfoA( SPI_SETSCREENREADER, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETSCREENREADER, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETSCREENREADER")) return;
|
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_change_message( SPI_SETSCREENREADER, 1 );
|
||||||
test_reg_key_ex2_optional( SPI_SETSCREENREADER_REGKEY, SPI_SETSCREENREADER_REGKEY_LEGACY,
|
test_reg_key_ex2_optional( SPI_SETSCREENREADER_REGKEY, SPI_SETSCREENREADER_REGKEY_LEGACY,
|
||||||
SPI_SETSCREENREADER_VALNAME, SPI_SETSCREENREADER_VALNAME_LEGACY,
|
SPI_SETSCREENREADER_VALNAME, SPI_SETSCREENREADER_VALNAME_LEGACY,
|
||||||
vals[i] ? "1" : "0" );
|
vals[i] ? "1" : "0" );
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_GETSCREENREADER, 0, &v, 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" );
|
eq( v, (BOOL)vals[i], "SPI_GETSCREENREADER", "%d" );
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETSCREENREADER, old_b, 0, SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETFONTSMOOTHING( void ) /* 75 */
|
||||||
|
@ -2006,7 +2004,7 @@ static void test_SPI_SETFONTSMOOTHING( void ) /* 75 */
|
||||||
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHING, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHING, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETFONTSMOOTHING")) return;
|
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_change_message( SPI_SETFONTSMOOTHING, 0 );
|
||||||
test_reg_key( SPI_SETFONTSMOOTHING_REGKEY,
|
test_reg_key( SPI_SETFONTSMOOTHING_REGKEY,
|
||||||
SPI_SETFONTSMOOTHING_VALNAME,
|
SPI_SETFONTSMOOTHING_VALNAME,
|
||||||
|
@ -2015,7 +2013,7 @@ static void test_SPI_SETFONTSMOOTHING( void ) /* 75 */
|
||||||
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHINGTYPE, 0, UlongToPtr(vals[i]),
|
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHINGTYPE, 0, UlongToPtr(vals[i]),
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETFONTSMOOTHINGTYPE")) return;
|
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_change_message( SPI_SETFONTSMOOTHINGTYPE, 0 );
|
||||||
test_reg_key_dword( SPI_SETFONTSMOOTHING_REGKEY,
|
test_reg_key_dword( SPI_SETFONTSMOOTHING_REGKEY,
|
||||||
SPI_SETFONTSMOOTHINGTYPE_VALNAME, &vals[i] );
|
SPI_SETFONTSMOOTHINGTYPE_VALNAME, &vals[i] );
|
||||||
|
@ -2023,7 +2021,7 @@ static void test_SPI_SETFONTSMOOTHING( void ) /* 75 */
|
||||||
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHINGCONTRAST, 0, UlongToPtr(vals[i]),
|
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHINGCONTRAST, 0, UlongToPtr(vals[i]),
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETFONTSMOOTHINGCONTRAST")) return;
|
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_change_message( SPI_SETFONTSMOOTHINGCONTRAST, 0 );
|
||||||
test_reg_key_dword( SPI_SETFONTSMOOTHING_REGKEY,
|
test_reg_key_dword( SPI_SETFONTSMOOTHING_REGKEY,
|
||||||
SPI_SETFONTSMOOTHINGCONTRAST_VALNAME, &vals[i] );
|
SPI_SETFONTSMOOTHINGCONTRAST_VALNAME, &vals[i] );
|
||||||
|
@ -2031,36 +2029,36 @@ static void test_SPI_SETFONTSMOOTHING( void ) /* 75 */
|
||||||
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHINGORIENTATION, 0, UlongToPtr(vals[i]),
|
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHINGORIENTATION, 0, UlongToPtr(vals[i]),
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETFONTSMOOTHINGORIENTATION")) return;
|
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_change_message( SPI_SETFONTSMOOTHINGORIENTATION, 0 );
|
||||||
test_reg_key_dword( SPI_SETFONTSMOOTHING_REGKEY,
|
test_reg_key_dword( SPI_SETFONTSMOOTHING_REGKEY,
|
||||||
SPI_SETFONTSMOOTHINGORIENTATION_VALNAME, &vals[i] );
|
SPI_SETFONTSMOOTHINGORIENTATION_VALNAME, &vals[i] );
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_GETFONTSMOOTHING, 0, &v, 0 );
|
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" );
|
eq( v, vals[i] ? 1 : 0, "SPI_GETFONTSMOOTHING", "%d" );
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_GETFONTSMOOTHINGTYPE, 0, &v, 0 );
|
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] );
|
ok( v == vals[i], "wrong value %x/%x\n", v, vals[i] );
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_GETFONTSMOOTHINGCONTRAST, 0, &v, 0 );
|
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] );
|
ok( v == vals[i], "wrong value %x/%x\n", v, vals[i] );
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_GETFONTSMOOTHINGORIENTATION, 0, &v, 0 );
|
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] );
|
ok( v == vals[i], "wrong value %x/%x\n", v, vals[i] );
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHING, old_b, 0, SPIF_UPDATEINIFILE );
|
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 );
|
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 );
|
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 );
|
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 */
|
static void test_SPI_SETLOWPOWERACTIVE( void ) /* 85 */
|
||||||
|
@ -2083,7 +2081,7 @@ static void test_SPI_SETLOWPOWERACTIVE( void ) /* 85 */
|
||||||
rc=SystemParametersInfoA( SPI_SETLOWPOWERACTIVE, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETLOWPOWERACTIVE, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETLOWPOWERACTIVE")) return;
|
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_change_message( SPI_SETLOWPOWERACTIVE, 1 );
|
||||||
test_reg_key_optional( SPI_SETLOWPOWERACTIVE_REGKEY,
|
test_reg_key_optional( SPI_SETLOWPOWERACTIVE_REGKEY,
|
||||||
SPI_SETLOWPOWERACTIVE_VALNAME,
|
SPI_SETLOWPOWERACTIVE_VALNAME,
|
||||||
|
@ -2092,7 +2090,7 @@ static void test_SPI_SETLOWPOWERACTIVE( void ) /* 85 */
|
||||||
/* SPI_SETLOWPOWERACTIVE is not persistent in win2k3 and above */
|
/* SPI_SETLOWPOWERACTIVE is not persistent in win2k3 and above */
|
||||||
v = 0xdeadbeef;
|
v = 0xdeadbeef;
|
||||||
rc=SystemParametersInfoA( SPI_GETLOWPOWERACTIVE, 0, &v, 0 );
|
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] ||
|
ok(v == vals[i] ||
|
||||||
broken(v == (0xdead0000 | vals[i])) || /* win98 only sets the low word */
|
broken(v == (0xdead0000 | vals[i])) || /* win98 only sets the low word */
|
||||||
v == 0, /* win2k3 */
|
v == 0, /* win2k3 */
|
||||||
|
@ -2100,7 +2098,7 @@ static void test_SPI_SETLOWPOWERACTIVE( void ) /* 85 */
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETLOWPOWERACTIVE, old_b, 0, SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETPOWEROFFACTIVE( void ) /* 86 */
|
||||||
|
@ -2123,7 +2121,7 @@ static void test_SPI_SETPOWEROFFACTIVE( void ) /* 86 */
|
||||||
rc=SystemParametersInfoA( SPI_SETPOWEROFFACTIVE, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETPOWEROFFACTIVE, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETPOWEROFFACTIVE")) return;
|
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_change_message( SPI_SETPOWEROFFACTIVE, 1 );
|
||||||
test_reg_key_optional( SPI_SETPOWEROFFACTIVE_REGKEY,
|
test_reg_key_optional( SPI_SETPOWEROFFACTIVE_REGKEY,
|
||||||
SPI_SETPOWEROFFACTIVE_VALNAME,
|
SPI_SETPOWEROFFACTIVE_VALNAME,
|
||||||
|
@ -2132,7 +2130,7 @@ static void test_SPI_SETPOWEROFFACTIVE( void ) /* 86 */
|
||||||
/* SPI_SETPOWEROFFACTIVE is not persistent in win2k3 and above */
|
/* SPI_SETPOWEROFFACTIVE is not persistent in win2k3 and above */
|
||||||
v = 0xdeadbeef;
|
v = 0xdeadbeef;
|
||||||
rc=SystemParametersInfoA( SPI_GETPOWEROFFACTIVE, 0, &v, 0 );
|
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] ||
|
ok(v == vals[i] ||
|
||||||
broken(v == (0xdead0000 | vals[i])) || /* win98 only sets the low word */
|
broken(v == (0xdead0000 | vals[i])) || /* win98 only sets the low word */
|
||||||
v == 0, /* win2k3 */
|
v == 0, /* win2k3 */
|
||||||
|
@ -2140,7 +2138,7 @@ static void test_SPI_SETPOWEROFFACTIVE( void ) /* 86 */
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETPOWEROFFACTIVE, old_b, 0, SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETSNAPTODEFBUTTON( void ) /* 95 */
|
||||||
|
@ -2163,19 +2161,19 @@ static void test_SPI_SETSNAPTODEFBUTTON( void ) /* 95 */
|
||||||
rc=SystemParametersInfoA( SPI_SETSNAPTODEFBUTTON, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETSNAPTODEFBUTTON, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETSNAPTODEFBUTTON")) return;
|
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_change_message( SPI_SETSNAPTODEFBUTTON, 0 );
|
||||||
test_reg_key_optional( SPI_SETSNAPTODEFBUTTON_REGKEY,
|
test_reg_key_optional( SPI_SETSNAPTODEFBUTTON_REGKEY,
|
||||||
SPI_SETSNAPTODEFBUTTON_VALNAME,
|
SPI_SETSNAPTODEFBUTTON_VALNAME,
|
||||||
vals[i] ? "1" : "0" );
|
vals[i] ? "1" : "0" );
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_GETSNAPTODEFBUTTON, 0, &v, 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" );
|
eq( v, vals[i], "SPI_GETSNAPTODEFBUTTON", "%d" );
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETSNAPTODEFBUTTON, old_b, 0, SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETMOUSEHOVERWIDTH( void ) /* 99 */
|
||||||
|
@ -2202,20 +2200,20 @@ static void test_SPI_SETMOUSEHOVERWIDTH( void ) /* 99 */
|
||||||
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERWIDTH, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERWIDTH, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETMOUSEHOVERWIDTH")) return;
|
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 );
|
test_change_message( SPI_SETMOUSEHOVERWIDTH, 0 );
|
||||||
sprintf( buf, "%d", vals[i] );
|
sprintf( buf, "%d", vals[i] );
|
||||||
test_reg_key( SPI_SETMOUSEHOVERWIDTH_REGKEY,
|
test_reg_key( SPI_SETMOUSEHOVERWIDTH_REGKEY,
|
||||||
SPI_SETMOUSEHOVERWIDTH_VALNAME, buf );
|
SPI_SETMOUSEHOVERWIDTH_VALNAME, buf );
|
||||||
|
|
||||||
SystemParametersInfoA( SPI_GETMOUSEHOVERWIDTH, 0, &v, 0 );
|
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" );
|
eq( v, vals[i], "SPI_{GET,SET}MOUSEHOVERWIDTH", "%d" );
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERWIDTH, old_width, 0,
|
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERWIDTH, old_width, 0,
|
||||||
SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETMOUSEHOVERHEIGHT( void ) /* 101 */
|
||||||
|
@ -2242,20 +2240,20 @@ static void test_SPI_SETMOUSEHOVERHEIGHT( void ) /* 101 */
|
||||||
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERHEIGHT, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERHEIGHT, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETMOUSEHOVERHEIGHT")) return;
|
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 );
|
test_change_message( SPI_SETMOUSEHOVERHEIGHT, 0 );
|
||||||
sprintf( buf, "%d", vals[i] );
|
sprintf( buf, "%d", vals[i] );
|
||||||
test_reg_key( SPI_SETMOUSEHOVERHEIGHT_REGKEY,
|
test_reg_key( SPI_SETMOUSEHOVERHEIGHT_REGKEY,
|
||||||
SPI_SETMOUSEHOVERHEIGHT_VALNAME, buf );
|
SPI_SETMOUSEHOVERHEIGHT_VALNAME, buf );
|
||||||
|
|
||||||
SystemParametersInfoA( SPI_GETMOUSEHOVERHEIGHT, 0, &v, 0 );
|
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" );
|
eq( v, vals[i], "SPI_{GET,SET}MOUSEHOVERHEIGHT", "%d" );
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERHEIGHT, old_height, 0,
|
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERHEIGHT, old_height, 0,
|
||||||
SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETMOUSEHOVERTIME( void ) /* 103 */
|
||||||
|
@ -2286,20 +2284,20 @@ static void test_SPI_SETMOUSEHOVERTIME( void ) /* 103 */
|
||||||
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERTIME, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERTIME, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETMOUSEHOVERTIME")) return;
|
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 );
|
test_change_message( SPI_SETMOUSEHOVERTIME, 0 );
|
||||||
sprintf( buf, "%d", vals[i] );
|
sprintf( buf, "%d", vals[i] );
|
||||||
test_reg_key( SPI_SETMOUSEHOVERTIME_REGKEY,
|
test_reg_key( SPI_SETMOUSEHOVERTIME_REGKEY,
|
||||||
SPI_SETMOUSEHOVERTIME_VALNAME, buf );
|
SPI_SETMOUSEHOVERTIME_VALNAME, buf );
|
||||||
|
|
||||||
SystemParametersInfoA( SPI_GETMOUSEHOVERTIME, 0, &v, 0 );
|
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" );
|
eq( v, vals[i], "SPI_{GET,SET}MOUSEHOVERTIME", "%d" );
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERTIME, old_time, 0,
|
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERTIME, old_time, 0,
|
||||||
SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETWHEELSCROLLLINES( void ) /* 105 */
|
||||||
|
@ -2325,20 +2323,20 @@ static void test_SPI_SETWHEELSCROLLLINES( void ) /* 105 */
|
||||||
rc=SystemParametersInfoA( SPI_SETWHEELSCROLLLINES, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETWHEELSCROLLLINES, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETWHEELSCROLLLINES")) return;
|
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 );
|
test_change_message( SPI_SETWHEELSCROLLLINES, 0 );
|
||||||
sprintf( buf, "%d", vals[i] );
|
sprintf( buf, "%d", vals[i] );
|
||||||
test_reg_key( SPI_SETMOUSESCROLLLINES_REGKEY,
|
test_reg_key( SPI_SETMOUSESCROLLLINES_REGKEY,
|
||||||
SPI_SETMOUSESCROLLLINES_VALNAME, buf );
|
SPI_SETMOUSESCROLLLINES_VALNAME, buf );
|
||||||
|
|
||||||
SystemParametersInfoA( SPI_GETWHEELSCROLLLINES, 0, &v, 0 );
|
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" );
|
eq( v, vals[i], "SPI_{GET,SET}WHEELSCROLLLINES", "%d" );
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETWHEELSCROLLLINES, old_lines, 0,
|
rc=SystemParametersInfoA( SPI_SETWHEELSCROLLLINES, old_lines, 0,
|
||||||
SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETMENUSHOWDELAY( void ) /* 107 */
|
||||||
|
@ -2364,20 +2362,20 @@ static void test_SPI_SETMENUSHOWDELAY( void ) /* 107 */
|
||||||
rc=SystemParametersInfoA( SPI_SETMENUSHOWDELAY, vals[i], 0,
|
rc=SystemParametersInfoA( SPI_SETMENUSHOWDELAY, vals[i], 0,
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
|
||||||
if (!test_error_msg(rc,"SPI_SETMENUSHOWDELAY")) return;
|
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 );
|
test_change_message( SPI_SETMENUSHOWDELAY, 0 );
|
||||||
sprintf( buf, "%d", vals[i] );
|
sprintf( buf, "%d", vals[i] );
|
||||||
test_reg_key( SPI_SETMENUSHOWDELAY_REGKEY,
|
test_reg_key( SPI_SETMENUSHOWDELAY_REGKEY,
|
||||||
SPI_SETMENUSHOWDELAY_VALNAME, buf );
|
SPI_SETMENUSHOWDELAY_VALNAME, buf );
|
||||||
|
|
||||||
SystemParametersInfoA( SPI_GETMENUSHOWDELAY, 0, &v, 0 );
|
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" );
|
eq( v, vals[i], "SPI_{GET,SET}MENUSHOWDELAY", "%d" );
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETMENUSHOWDELAY, old_delay, 0,
|
rc=SystemParametersInfoA( SPI_SETMENUSHOWDELAY, old_delay, 0,
|
||||||
SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETWHEELSCROLLCHARS( void ) /* 108 */
|
||||||
|
@ -2409,13 +2407,13 @@ static void test_SPI_SETWHEELSCROLLCHARS( void ) /* 108 */
|
||||||
SPI_SETMOUSESCROLLCHARS_VALNAME, buf );
|
SPI_SETMOUSESCROLLCHARS_VALNAME, buf );
|
||||||
|
|
||||||
SystemParametersInfoA( SPI_GETWHEELSCROLLCHARS, 0, &v, 0 );
|
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" );
|
eq( v, vals[i], "SPI_{GET,SET}WHEELSCROLLCHARS", "%d" );
|
||||||
}
|
}
|
||||||
|
|
||||||
rc=SystemParametersInfoA( SPI_SETWHEELSCROLLCHARS, old_chars, 0,
|
rc=SystemParametersInfoA( SPI_SETWHEELSCROLLCHARS, old_chars, 0,
|
||||||
SPIF_UPDATEINIFILE );
|
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 */
|
static void test_SPI_SETWALLPAPER( void ) /* 115 */
|
||||||
|
@ -2436,11 +2434,11 @@ static void test_SPI_SETWALLPAPER( void ) /* 115 */
|
||||||
strcpy(newval, "");
|
strcpy(newval, "");
|
||||||
rc=SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, newval, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
|
rc=SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, newval, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
|
||||||
if (!test_error_msg(rc,"SPI_SETDESKWALLPAPER")) return;
|
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);
|
test_change_message(SPI_SETDESKWALLPAPER, 0);
|
||||||
|
|
||||||
rc=SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, oldval, SPIF_UPDATEINIFILE);
|
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);
|
test_reg_key(SPI_SETDESKWALLPAPER_REGKEY, SPI_SETDESKWALLPAPER_VALNAME, oldval);
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,16 +113,16 @@ static void wsprintfWTest(void)
|
||||||
|
|
||||||
static void CharUpperTest(void)
|
static void CharUpperTest(void)
|
||||||
{
|
{
|
||||||
INT_PTR i,out,failed;
|
INT_PTR i, out;
|
||||||
|
BOOL failed = FALSE;
|
||||||
|
|
||||||
failed = 0;
|
|
||||||
for (i=0;i<256;i++)
|
for (i=0;i<256;i++)
|
||||||
{
|
{
|
||||||
out = (INT_PTR)CharUpperA((LPSTR)i);
|
out = (INT_PTR)CharUpperA((LPSTR)i);
|
||||||
/* printf("%0x ",out); */
|
/* printf("%0x ",out); */
|
||||||
if ((out >> 16) != 0)
|
if ((out >> 16) != 0)
|
||||||
{
|
{
|
||||||
failed = 1;
|
failed = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -131,16 +131,16 @@ static void CharUpperTest(void)
|
||||||
|
|
||||||
static void CharLowerTest(void)
|
static void CharLowerTest(void)
|
||||||
{
|
{
|
||||||
INT_PTR i,out,failed;
|
INT_PTR i, out;
|
||||||
|
BOOL failed = FALSE;
|
||||||
|
|
||||||
failed = 0;
|
|
||||||
for (i=0;i<256;i++)
|
for (i=0;i<256;i++)
|
||||||
{
|
{
|
||||||
out = (INT_PTR)CharLowerA((LPSTR)i);
|
out = (INT_PTR)CharLowerA((LPSTR)i);
|
||||||
/* printf("%0x ",out); */
|
/* printf("%0x ",out); */
|
||||||
if ((out >> 16) != 0)
|
if ((out >> 16) != 0)
|
||||||
{
|
{
|
||||||
failed = 1;
|
failed = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue