user/tests: Win64 printf format warning fixes.

This commit is contained in:
Michael Stefaniuc 2006-10-07 21:45:11 +02:00 committed by Alexandre Julliard
parent a76b29e0ba
commit 66ef2f253d
18 changed files with 569 additions and 570 deletions

View File

@ -4,7 +4,6 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = user32.dll
IMPORTS = user32 gdi32 advapi32 kernel32
EXTRADEFS = -DWINE_NO_LONG_AS_INT
CTESTS = \
class.c \

View File

@ -106,9 +106,9 @@ static void ClassTest(HINSTANCE hInstance, BOOL global)
{
SetLastError(0);
ok(!SetClassLongW(hTestWnd,i*sizeof(DWORD),i+1),
"GetClassLongW(%ld) initial value nonzero!\n",i*sizeof(DWORD));
"GetClassLongW(%d) initial value nonzero!\n",i*sizeof(DWORD));
ok(!GetLastError(),
"SetClassLongW(%ld) failed!\n",i*sizeof(DWORD));
"SetClassLongW(%d) failed!\n",i*sizeof(DWORD));
}
/* test values of valid classwords that we set */
@ -255,7 +255,7 @@ static void check_instance( const char *name, HINSTANCE inst, HINSTANCE info_ins
"Wrong GWL instance %p/%p for window %s\n",
(HINSTANCE)GetWindowLongPtrA( hwnd, GWLP_HINSTANCE ), inst, name );
ok(!UnregisterClassA(name, inst), "UnregisterClassA should fail while exists a class window\n");
ok(GetLastError() == ERROR_CLASS_HAS_WINDOWS, "GetLastError() should be set to ERROR_CLASS_HAS_WINDOWS not %ld\n", GetLastError());
ok(GetLastError() == ERROR_CLASS_HAS_WINDOWS, "GetLastError() should be set to ERROR_CLASS_HAS_WINDOWS not %d\n", GetLastError());
DestroyWindow(hwnd);
}
@ -286,7 +286,7 @@ static void check_thread_instance( const char *name, HINSTANCE inst, HINSTANCE i
class_info.gcl_inst = gcl_inst;
hThread = CreateThread(NULL, 0, thread_proc, &class_info, 0, &tid);
ok(hThread != NULL, "CreateThread failed, error %ld\n", GetLastError());
ok(hThread != NULL, "CreateThread failed, error %d\n", GetLastError());
ok(WaitForSingleObject(hThread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
CloseHandle(hThread);
}
@ -425,7 +425,7 @@ static void test_instances(void)
cls.lpszMenuName = "null";
cls.hInstance = 0;
ok( !RegisterClassA( &cls ), "Succeeded registering local class for null instance\n" );
ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %ld\n", GetLastError() );
ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %d\n", GetLastError() );
ok( UnregisterClassA( name, main_module ), "Unregister failed for main module\n" );
ok( RegisterClassA( &cls ), "Failed to register local class for null instance\n" );
@ -434,17 +434,17 @@ static void test_instances(void)
check_instance( name, main_module, main_module, main_module );
check_thread_instance( name, main_module, main_module, main_module );
ok( !GetClassInfo( 0, name, &wc ), "Class found with null instance\n" );
ok( GetLastError() == ERROR_CLASS_DOES_NOT_EXIST, "Wrong error code %ld\n", GetLastError() );
ok( GetLastError() == ERROR_CLASS_DOES_NOT_EXIST, "Wrong error code %d\n", GetLastError() );
ok( UnregisterClassA( name, 0 ), "Unregister failed for null instance\n" );
/* registering for user32 always fails */
cls.lpszMenuName = "user32";
cls.hInstance = user32;
ok( !RegisterClassA( &cls ), "Succeeded registering local class for user32\n" );
ok( GetLastError() == ERROR_INVALID_PARAMETER, "Wrong error code %ld\n", GetLastError() );
ok( GetLastError() == ERROR_INVALID_PARAMETER, "Wrong error code %d\n", GetLastError() );
cls.style |= CS_GLOBALCLASS;
ok( !RegisterClassA( &cls ), "Succeeded registering global class for user32\n" );
ok( GetLastError() == ERROR_INVALID_PARAMETER, "Wrong error code %ld\n", GetLastError() );
ok( GetLastError() == ERROR_INVALID_PARAMETER, "Wrong error code %d\n", GetLastError() );
/* unregister is OK though */
cls.hInstance = main_module;
@ -459,12 +459,12 @@ static void test_instances(void)
cls.lpszMenuName = "kernel32";
cls.hInstance = kernel32;
ok( !RegisterClassA( &cls ), "Succeeded registering local class for kernel32\n" );
ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %ld\n", GetLastError() );
ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %d\n", GetLastError() );
/* even if global flag is cleared */
hwnd = CreateWindowExA( 0, name, "test", 0, 0, 0, 0, 0, 0, 0, main_module, 0 );
SetClassLongA( hwnd, GCL_STYLE, 0 );
ok( !RegisterClassA( &cls ), "Succeeded registering local class for kernel32\n" );
ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %ld\n", GetLastError() );
ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %d\n", GetLastError() );
check_class( main_module, name, "main_module" );
check_class( kernel32, name, "main_module" );
@ -485,7 +485,7 @@ static void test_instances(void)
DestroyWindow( hwnd );
ok( UnregisterClassA( name, (HINSTANCE)0x87654321 ), "Unregister failed for main module global\n" );
ok( !UnregisterClassA( name, (HINSTANCE)0x87654321 ), "Unregister succeeded the second time\n" );
ok( GetLastError() == ERROR_CLASS_DOES_NOT_EXIST, "Wrong error code %ld\n", GetLastError() );
ok( GetLastError() == ERROR_CLASS_DOES_NOT_EXIST, "Wrong error code %d\n", GetLastError() );
cls.hInstance = (HINSTANCE)0x12345678;
ok( RegisterClassA( &cls ), "Failed to register global class for dummy instance\n" );
@ -503,10 +503,10 @@ static void test_instances(void)
cls.lpszClassName = "BUTTON";
cls.hInstance = main_module;
ok( !RegisterClassA( &cls ), "Succeeded registering global button class for main module\n" );
ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %ld\n", GetLastError() );
ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %d\n", GetLastError() );
cls.hInstance = kernel32;
ok( !RegisterClassA( &cls ), "Succeeded registering global button class for kernel32\n" );
ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %ld\n", GetLastError() );
ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %d\n", GetLastError() );
/* local class is OK however */
cls.style &= ~CS_GLOBALCLASS;
@ -534,9 +534,9 @@ static void test_instances(void)
ok( GetClassInfo( kernel32, "BUTTON", &wc ), "Button class not found with kernel32\n" );
ok( UnregisterClass( "BUTTON", (HINSTANCE)0x12345678 ), "Failed to unregister button\n" );
ok( !UnregisterClass( "BUTTON", (HINSTANCE)0x87654321 ), "Unregistered button a second time\n" );
ok( GetLastError() == ERROR_CLASS_DOES_NOT_EXIST, "Wrong error code %ld\n", GetLastError() );
ok( GetLastError() == ERROR_CLASS_DOES_NOT_EXIST, "Wrong error code %d\n", GetLastError() );
ok( !GetClassInfo( 0, "BUTTON", &wc ), "Button still exists\n" );
ok( GetLastError() == ERROR_CLASS_DOES_NOT_EXIST, "Wrong error code %ld\n", GetLastError() );
ok( GetLastError() == ERROR_CLASS_DOES_NOT_EXIST, "Wrong error code %d\n", GetLastError() );
/* we can change the instance of a system class */
check_instance( "EDIT", (HINSTANCE)0xdeadbeef, (HINSTANCE)0xdeadbeef, user32 );

View File

@ -30,7 +30,7 @@ static BOOL is_win9x = FALSE;
{ \
if (!is_win9x) \
ok(GetLastError() == expected_error, \
"Last error should be set to %d, not %ld\n", \
"Last error should be set to %d, not %d\n", \
expected_error, GetLastError()); \
} while (0)
@ -45,12 +45,12 @@ static void test_ClipboardOwner(void)
hWnd1 = CreateWindowExA(0, "static", NULL, WS_POPUP,
0, 0, 10, 10, 0, 0, 0, NULL);
ok(hWnd1 != 0, "CreateWindowExA error %ld\n", GetLastError());
ok(hWnd1 != 0, "CreateWindowExA error %d\n", GetLastError());
trace("hWnd1 = %p\n", hWnd1);
hWnd2 = CreateWindowExA(0, "static", NULL, WS_POPUP,
0, 0, 10, 10, 0, 0, 0, NULL);
ok(hWnd2 != 0, "CreateWindowExA error %ld\n", GetLastError());
ok(hWnd2 != 0, "CreateWindowExA error %d\n", GetLastError());
trace("hWnd2 = %p\n", hWnd2);
SetLastError(0xdeadbeef);
@ -61,7 +61,7 @@ static void test_ClipboardOwner(void)
ok(!GetClipboardOwner(), "clipboard should still be not owned\n");
ok(!OpenClipboard(hWnd1), "OpenClipboard should fail since clipboard already opened\n");
ret = CloseClipboard();
ok( ret, "CloseClipboard error %ld\n", GetLastError());
ok( ret, "CloseClipboard error %d\n", GetLastError());
ok(OpenClipboard(hWnd1), "OpenClipboard failed\n");
@ -72,7 +72,7 @@ static void test_ClipboardOwner(void)
SetLastError(0xdeadbeef);
ok(!GetClipboardOwner() && GetLastError() == 0xdeadbeef, "clipboard should still be not owned\n");
ret = EmptyClipboard();
ok( ret, "EmptyClipboard error %ld\n", GetLastError());
ok( ret, "EmptyClipboard error %d\n", GetLastError());
ok(GetClipboardOwner() == hWnd1, "clipboard should be owned by %p, not by %p\n", hWnd1, GetClipboardOwner());
SetLastError(0xdeadbeef);
@ -80,13 +80,13 @@ static void test_ClipboardOwner(void)
"OpenClipboard should fail without setting last error value\n");
ret = CloseClipboard();
ok( ret, "CloseClipboard error %ld\n", GetLastError());
ok( ret, "CloseClipboard error %d\n", GetLastError());
ok(GetClipboardOwner() == hWnd1, "clipboard should still be owned\n");
ret = DestroyWindow(hWnd1);
ok( ret, "DestroyWindow error %ld\n", GetLastError());
ok( ret, "DestroyWindow error %d\n", GetLastError());
ret = DestroyWindow(hWnd2);
ok( ret, "DestroyWindow error %ld\n", GetLastError());
ok( ret, "DestroyWindow error %d\n", GetLastError());
SetLastError(0xdeadbeef);
ok(!GetClipboardOwner() && GetLastError() == 0xdeadbeef, "clipboard should not be owned\n");
}
@ -157,7 +157,7 @@ todo_wine
#endif
ret = OpenClipboard(0);
ok( ret, "OpenClipboard error %ld\n", GetLastError());
ok( ret, "OpenClipboard error %d\n", GetLastError());
trace("# of formats available: %d\n", CountClipboardFormats());
@ -170,16 +170,16 @@ todo_wine
}
ret = EmptyClipboard();
ok( ret, "EmptyClipboard error %ld\n", GetLastError());
ok( ret, "EmptyClipboard error %d\n", GetLastError());
ret =CloseClipboard();
ok( ret, "CloseClipboard error %ld\n", GetLastError());
ok( ret, "CloseClipboard error %d\n", GetLastError());
if (CountClipboardFormats())
{
SetLastError(0xdeadbeef);
ok(!EnumClipboardFormats(0), "EnumClipboardFormats should fail if clipboard wasn't open\n");
ok(GetLastError() == ERROR_CLIPBOARD_NOT_OPEN,
"Last error should be set to ERROR_CLIPBOARD_NOT_OPEN, not %ld\n", GetLastError());
"Last error should be set to ERROR_CLIPBOARD_NOT_OPEN, not %d\n", GetLastError());
}
SetLastError(0xdeadbeef);

View File

@ -172,7 +172,7 @@ static void test_dc_visrgn(void)
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
"invalid clip box %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
ReleaseDC( hwnd_cache, hdc );
ok( GetRgnBox( hrgn, &rect ) == ERROR, "region must no longer be valid\n" );
@ -186,7 +186,7 @@ static void test_dc_visrgn(void)
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
"invalid clip box %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
ReleaseDC( hwnd_cache, hdc );
ok( GetRgnBox( hrgn, &rect ) == ERROR, "region must no longer be valid\n" );
@ -194,7 +194,7 @@ static void test_dc_visrgn(void)
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( !(rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20),
"clip box sould have been reset %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"clip box sould have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
ReleaseDC( hwnd_cache, hdc );
/* window DC */
@ -206,19 +206,19 @@ static void test_dc_visrgn(void)
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
"invalid clip box %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
ReleaseDC( hwnd_owndc, hdc );
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
"invalid clip box %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
hdc = GetDCEx( hwnd_owndc, 0, DCX_USESTYLE );
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
"invalid clip box %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
ReleaseDC( hwnd_owndc, hdc );
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
@ -231,7 +231,7 @@ static void test_dc_visrgn(void)
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( rect.left >= 20 && rect.top >= 20 && rect.right <= 30 && rect.bottom <= 30,
"invalid clip box %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
ok( GetRgnBox( hrgn2, &rect ) != ERROR, "region2 must still be valid\n" );
ReleaseDC( hwnd_owndc, hdc );
ok( GetRgnBox( hrgn2, &rect ) != ERROR, "region2 must still be valid\n" );
@ -240,7 +240,7 @@ static void test_dc_visrgn(void)
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( !(rect.left >= 20 && rect.top >= 20 && rect.right <= 30 && rect.bottom <= 30),
"clip box should have been reset %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"clip box should have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
ReleaseDC( hwnd_owndc, hdc );
/* class DC */
@ -252,20 +252,20 @@ static void test_dc_visrgn(void)
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
"invalid clip box %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
ReleaseDC( hwnd_classdc, hdc );
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
"invalid clip box %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
hdc = GetDCEx( hwnd_classdc, 0, DCX_USESTYLE );
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
"invalid clip box %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
ReleaseDC( hwnd_classdc, hdc );
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
@ -278,7 +278,7 @@ static void test_dc_visrgn(void)
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( rect.left >= 20 && rect.top >= 20 && rect.right <= 30 && rect.bottom <= 30,
"invalid clip box %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
ok( GetRgnBox( hrgn2, &rect ) != ERROR, "region2 must still be valid\n" );
old_hdc = hdc;
@ -288,13 +288,13 @@ static void test_dc_visrgn(void)
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( !(rect.left >= 20 && rect.top >= 20 && rect.right <= 30 && rect.bottom <= 30),
"clip box should have been reset %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"clip box should have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
ReleaseDC( hwnd_classdc2, hdc );
ok( GetRgnBox( hrgn2, &rect ) != ERROR, "region2 must still be valid\n" );
hdc = GetDCEx( hwnd_classdc2, 0, DCX_EXCLUDERGN | DCX_USESTYLE );
ok( GetRgnBox( hrgn2, &rect ) != ERROR, "region2 must still be valid\n" );
ok( !(rect.left >= 20 && rect.top >= 20 && rect.right <= 30 && rect.bottom <= 30),
"clip box must have been reset %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"clip box must have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
ReleaseDC( hwnd_classdc2, hdc );
}
@ -316,7 +316,7 @@ static void test_begin_paint(void)
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
"invalid clip box %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
EndPaint( hwnd_cache, &ps );
/* window DC */
@ -328,22 +328,22 @@ static void test_begin_paint(void)
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
"invalid clip box %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
ReleaseDC( hwnd_owndc, hdc );
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
"invalid clip box %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
ok( GetDC( hwnd_owndc ) == hdc, "got different hdc\n" );
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
"invalid clip box %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
EndPaint( hwnd_owndc, &ps );
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( !(rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20),
"clip box should have been reset %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"clip box should have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
RedrawWindow( hwnd_owndc, NULL, 0, RDW_VALIDATE|RDW_NOFRAME|RDW_NOERASE );
SetRect( &rect, 10, 10, 20, 20 );
RedrawWindow( hwnd_owndc, &rect, 0, RDW_INVALIDATE|RDW_ERASE );
@ -351,12 +351,12 @@ static void test_begin_paint(void)
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( !(rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20),
"clip box should be the whole window %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"clip box should be the whole window %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
RedrawWindow( hwnd_owndc, NULL, 0, RDW_ERASENOW );
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( !(rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20),
"clip box should still be the whole window %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"clip box should still be the whole window %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
/* class DC */
@ -367,7 +367,7 @@ static void test_begin_paint(void)
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
"invalid clip box %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
old_hdc = hdc;
hdc = GetDC( hwnd_classdc2 );
@ -375,7 +375,7 @@ static void test_begin_paint(void)
SetRectEmpty( &rect );
GetClipBox( hdc, &rect );
ok( !(rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20),
"clip box should have been reset %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"clip box should have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
}

View File

@ -227,7 +227,7 @@ static void test_dde_transaction(void)
dde_inst = 0;
ret = DdeInitializeA(&dde_inst, client_dde_callback, APPCMD_CLIENTONLY, 0);
ok(ret == DMLERR_NO_ERROR, "DdeInitializeW failed with error %04lx (%x)\n",
ok(ret == DMLERR_NO_ERROR, "DdeInitializeW failed with error %04x (%x)\n",
ret, DdeGetLastError(dde_inst));
hsz_server = DdeCreateStringHandleW(dde_inst, TEST_DDE_SERVICE, CP_WINUNICODE);
@ -235,11 +235,11 @@ static void test_dde_transaction(void)
hconv = DdeConnect(dde_inst, hsz_server, 0, NULL);
ok(hconv != 0, "DdeConnect error %x\n", DdeGetLastError(dde_inst));
err = DdeGetLastError(dde_inst);
ok(err == DMLERR_NO_ERROR, "wrong dde error %lx\n", err);
ok(err == DMLERR_NO_ERROR, "wrong dde error %x\n", err);
info.cb = sizeof(info);
ret = DdeQueryConvInfo(hconv, QID_SYNC, &info);
ok(ret, "wrong info size %ld, DdeQueryConvInfo error %x\n", ret, DdeGetLastError(dde_inst));
ok(ret, "wrong info size %d, DdeQueryConvInfo error %x\n", ret, DdeGetLastError(dde_inst));
/* should be CP_WINANSI since we used DdeInitializeA */
ok(info.ConvCtxt.iCodePage == CP_WINANSI, "wrong iCodePage %d\n", info.ConvCtxt.iCodePage);
ok(!info.hConvPartner, "unexpected info.hConvPartner: %p\n", info.hConvPartner);
@ -256,26 +256,26 @@ todo_wine {
ret = 0xdeadbeef;
hdata = DdeClientTransaction((LPBYTE)test_cmd, strlen(test_cmd) + 1, hconv, (HSZ)0xdead, 0xbeef, XTYP_EXECUTE, 1000, &ret);
ok(!hdata, "DdeClientTransaction succeeded\n");
ok(ret == DDE_FNOTPROCESSED, "wrong status code %04lx\n", ret);
ok(ret == DDE_FNOTPROCESSED, "wrong status code %04x\n", ret);
err = DdeGetLastError(dde_inst);
ok(err == DMLERR_NOTPROCESSED, "wrong dde error %lx\n", err);
ok(err == DMLERR_NOTPROCESSED, "wrong dde error %x\n", err);
trace("sending ANSI client transaction command\n");
ret = 0xdeadbeef;
hdata = DdeClientTransaction((LPBYTE)exec_cmdA, lstrlenA(exec_cmdA) + 1, hconv, 0, 0, XTYP_EXECUTE, 1000, &ret);
ok(hdata != 0, "DdeClientTransaction returned %p, error %x\n", hdata, DdeGetLastError(dde_inst));
ok(ret == DDE_FACK, "wrong status code %04lx\n", ret);
ok(ret == DDE_FACK, "wrong status code %04x\n", ret);
err = DdeGetLastError(dde_inst);
ok(err == DMLERR_NO_ERROR, "wrong dde error %lx\n", err);
ok(err == DMLERR_NO_ERROR, "wrong dde error %x\n", err);
trace("sending unicode client transaction command\n");
ret = 0xdeadbeef;
hdata = DdeClientTransaction((LPBYTE)exec_cmdW, (lstrlenW(exec_cmdW) + 1) * sizeof(WCHAR), hconv, 0, 0, XTYP_EXECUTE, 1000, &ret);
ok(hdata != 0, "DdeClientTransaction returned %p, error %x\n", hdata, DdeGetLastError(dde_inst));
ok(ret == DDE_FACK, "wrong status code %04lx\n", ret);
ok(ret == DDE_FACK, "wrong status code %04x\n", ret);
err = DdeGetLastError(dde_inst);
ok(err == DMLERR_NO_ERROR, "wrong dde error %lx\n", err);
ok(err == DMLERR_NO_ERROR, "wrong dde error %x\n", err);
ok(DdeDisconnect(hconv), "DdeDisconnect error %x\n", DdeGetLastError(dde_inst));
@ -284,7 +284,7 @@ todo_wine {
ok(!ret, "DdeQueryConvInfo should fail\n");
err = DdeGetLastError(dde_inst);
todo_wine {
ok(err == DMLERR_INVALIDPARAMETER, "wrong dde error %lx\n", err);
ok(err == DMLERR_INVALIDPARAMETER, "wrong dde error %x\n", err);
}
ok(DdeFreeStringHandle(dde_inst, hsz_server), "DdeFreeStringHandle error %x\n", DdeGetLastError(dde_inst));
@ -366,12 +366,12 @@ static void test_DdeCreateStringHandle(void)
return;
}
ok(ret == DMLERR_INVALIDPARAMETER, "DdeInitializeW should fail, but got %04lx instead\n", ret);
ok(ret == DMLERR_INVALIDPARAMETER, "DdeInitializeW should fail, but got %04x instead\n", ret);
ok(DdeGetLastError(dde_inst) == DMLERR_INVALIDPARAMETER, "expected DMLERR_INVALIDPARAMETER\n");
dde_inst = 0;
ret = DdeInitializeW(&dde_inst, client_dde_callback, APPCMD_CLIENTONLY, 0);
ok(ret == DMLERR_NO_ERROR, "DdeInitializeW failed with error %04lx (%08x)\n",
ok(ret == DMLERR_NO_ERROR, "DdeInitializeW failed with error %04x (%08x)\n",
ret, DdeGetLastError(dde_inst));
test_DdeCreateStringHandleW(dde_inst, 0);

View File

@ -196,7 +196,7 @@ static BOOL CreateWindows (HINSTANCE hinst)
exstyle = GetWindowLong (hwnd[p->id], GWL_EXSTYLE);
if (style != p->style || exstyle != p->exstyle)
{
trace ("Style mismatch at %d: %8.8lx %8.8lx cf %8.8lx %8.8lx\n", p->id, style, exstyle, p->style, p->exstyle);
trace ("Style mismatch at %d: %8.8x %8.8x cf %8.8x %8.8x\n", p->id, style, exstyle, p->style, p->exstyle);
}
}
p++;

View File

@ -167,52 +167,52 @@ static void test_edit_control_1(void)
trace("EDIT: Single line\n");
hwEdit = create_editcontrol(ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0);
r = get_edit_style(hwEdit);
ok(r == (ES_AUTOVSCROLL | ES_AUTOHSCROLL), "Wrong style expected 0xc0 got: 0x%lx\n", r);
ok(r == (ES_AUTOVSCROLL | ES_AUTOHSCROLL), "Wrong style expected 0xc0 got: 0x%x\n", r);
for (i=0;i<65535;i++)
{
msMessage.wParam = i;
r = SendMessage(hwEdit, WM_GETDLGCODE, 0, (LPARAM) &msMessage);
ok(r == (DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS),
"Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS got %lx\n", r);
"Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS got %x\n", r);
}
DestroyWindow (hwEdit);
trace("EDIT: Single line want returns\n");
hwEdit = create_editcontrol(ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0);
r = get_edit_style(hwEdit);
ok(r == (ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN), "Wrong style expected 0x10c0 got: 0x%lx\n", r);
ok(r == (ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN), "Wrong style expected 0x10c0 got: 0x%x\n", r);
for (i=0;i<65535;i++)
{
msMessage.wParam = i;
r = SendMessage(hwEdit, WM_GETDLGCODE, 0, (LPARAM) &msMessage);
ok(r == (DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS),
"Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS got %lx\n", r);
"Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS got %x\n", r);
}
DestroyWindow (hwEdit);
trace("EDIT: Multiline line\n");
hwEdit = create_editcontrol(ES_MULTILINE | WS_VSCROLL | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0);
r = get_edit_style(hwEdit);
ok(r == (ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE), "Wrong style expected 0xc4 got: 0x%lx\n", r);
ok(r == (ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE), "Wrong style expected 0xc4 got: 0x%x\n", r);
for (i=0;i<65535;i++)
{
msMessage.wParam = i;
r = SendMessage(hwEdit, WM_GETDLGCODE, 0, (LPARAM) &msMessage);
ok(r == (DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS),
"Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS got %lx\n", r);
"Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS got %x\n", r);
}
DestroyWindow (hwEdit);
trace("EDIT: Multi line want returns\n");
hwEdit = create_editcontrol(ES_MULTILINE | WS_VSCROLL | ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0);
r = get_edit_style(hwEdit);
ok(r == (ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE), "Wrong style expected 0x10c4 got: 0x%lx\n", r);
ok(r == (ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE), "Wrong style expected 0x10c4 got: 0x%x\n", r);
for (i=0;i<65535;i++)
{
msMessage.wParam = i;
r = SendMessage(hwEdit, WM_GETDLGCODE, 0, (LPARAM) &msMessage);
ok(r == (DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS),
"Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS got %lx\n", r);
"Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS got %x\n", r);
}
DestroyWindow (hwEdit);
}
@ -863,7 +863,7 @@ static void test_margins_font_change(void)
}
#define edit_pos_ok(exp, got, txt) \
ok(exp == got, "wrong " #txt " expected %d got %ld\n", exp, got);
ok(exp == got, "wrong " #txt " expected %d got %d\n", exp, got);
#define check_pos(hwEdit, set_height, test_top, test_height, test_left) \
do { \

View File

@ -240,7 +240,7 @@ static void do_test( HWND hwnd, int seqnr, const KEV td[] )
trace("======== key stroke sequence #%d: %s =============\n",
seqnr + 1, buf);
while( PeekMessage(&msg,hwnd,WM_KEYFIRST,WM_KEYLAST,PM_REMOVE) ) {
trace("message[%d] %-15s wParam %04x lParam %08lx time %lx\n", i,
trace("message[%d] %-15s wParam %04x lParam %08lx time %x\n", i,
MSGNAME[msg.message - WM_KEYFIRST], msg.wParam, msg.lParam, msg.time);
if( i < kmctr ) {
ok( msg.message == expmsg[i].message &&

View File

@ -211,7 +211,7 @@ static void check_item_height(void)
ok (SendMessage(hLB, WM_SETFONT, (WPARAM)font, 0) == 0, "Can't set font\n");
itemHeight = SendMessage(hLB, LB_GETITEMHEIGHT, 0, 0);
ok (itemHeight == tm.tmHeight, "Item height wrong, got %d, expecting %ld\n", itemHeight, tm.tmHeight);
ok (itemHeight == tm.tmHeight, "Item height wrong, got %d, expecting %d\n", itemHeight, tm.tmHeight);
DestroyWindow (hLB);
}
@ -232,16 +232,16 @@ static LRESULT WINAPI main_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA
ok(dis->CtlType == ODT_LISTBOX, "wrong CtlType %04x\n", dis->CtlType);
GetClientRect(dis->hwndItem, &rc_client);
trace("hwndItem %p client rect (%ld,%ld-%ld,%ld)\n", dis->hwndItem,
trace("hwndItem %p client rect (%d,%d-%d,%d)\n", dis->hwndItem,
rc_client.left, rc_client.top, rc_client.right, rc_client.bottom);
GetClipBox(dis->hDC, &rc_clip);
trace("clip rect (%ld,%ld-%ld,%ld)\n", rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom);
trace("clip rect (%d,%d-%d,%d)\n", rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom);
ok(EqualRect(&rc_client, &rc_clip), "client rect of the listbox should be equal to the clip box\n");
trace("rcItem (%ld,%ld-%ld,%ld)\n", dis->rcItem.left, dis->rcItem.top,
trace("rcItem (%d,%d-%d,%d)\n", dis->rcItem.left, dis->rcItem.top,
dis->rcItem.right, dis->rcItem.bottom);
SendMessage(dis->hwndItem, LB_GETITEMRECT, dis->itemID, (LPARAM)&rc_item);
trace("item rect (%ld,%ld-%ld,%ld)\n", rc_item.left, rc_item.top, rc_item.right, rc_item.bottom);
trace("item rect (%d,%d-%d,%d)\n", rc_item.left, rc_item.top, rc_item.right, rc_item.bottom);
ok(EqualRect(&dis->rcItem, &rc_item), "item rects are not equal\n");
break;
@ -296,9 +296,9 @@ static void test_ownerdraw(void)
ok(ret == 1, "wrong top index %d\n", ret);
SendMessage(hLB, LB_GETITEMRECT, 0, (LPARAM)&rc);
trace("item 0 rect (%ld,%ld-%ld,%ld)\n", rc.left, rc.top, rc.right, rc.bottom);
trace("item 0 rect (%d,%d-%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom);
ok(!IsRectEmpty(&rc), "empty item rect\n");
ok(rc.top < 0, "rc.top is not negative (%ld)\n", rc.top);
ok(rc.top < 0, "rc.top is not negative (%d)\n", rc.top);
DestroyWindow(hLB);
DestroyWindow(parent);

View File

@ -123,7 +123,7 @@ static LRESULT WINAPI menu_ownerdraw_wnd_proc(HWND hwnd, UINT msg,
if( winetest_debug) {
RECT rc;
GetMenuItemRect( hwnd, (HMENU)pdis->hwndItem, pdis->itemData ,&rc);
trace("WM_DRAWITEM received hwnd %p hmenu %p itemdata %ld item %d rc %ld,%ld-%ld,%ld itemrc: %ld,%ld-%ld,%ld\n",
trace("WM_DRAWITEM received hwnd %p hmenu %p itemdata %ld item %d rc %d,%d-%d,%d itemrc: %d,%d-%d,%d\n",
hwnd, (HMENU)pdis->hwndItem, pdis->itemData,
pdis->itemID, pdis->rcItem.left, pdis->rcItem.top,
pdis->rcItem.right,pdis->rcItem.bottom,
@ -202,19 +202,19 @@ static void test_menu_locked_by_window(void)
HWND hwnd = CreateWindowEx(0, MAKEINTATOM(atomMenuCheckClass), NULL,
WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200,
NULL, NULL, NULL, NULL);
ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
hmenu = CreateMenu();
ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError());
ret = InsertMenu(hmenu, 0, MF_STRING, 0, TEXT("&Test"));
ok(ret, "InsertMenu failed with error %ld\n", GetLastError());
ok(ret, "InsertMenu failed with error %d\n", GetLastError());
ret = SetMenu(hwnd, hmenu);
ok(ret, "SetMenu failed with error %ld\n", GetLastError());
ok(ret, "SetMenu failed with error %d\n", GetLastError());
ret = DestroyMenu(hmenu);
ok(ret, "DestroyMenu failed with error %ld\n", GetLastError());
ok(ret, "DestroyMenu failed with error %d\n", GetLastError());
ret = DrawMenuBar(hwnd);
todo_wine {
ok(ret, "DrawMenuBar failed with error %ld\n", GetLastError());
ok(ret, "DrawMenuBar failed with error %d\n", GetLastError());
}
ret = IsMenu(GetMenu(hwnd));
ok(!ret, "Menu handle should have been destroyed\n");
@ -238,11 +238,11 @@ static void test_menu_ownerdraw(void)
HWND hwnd = CreateWindowEx(0, MAKEINTATOM(atomMenuCheckClass), NULL,
WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200,
NULL, NULL, NULL, NULL);
ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
if( !hwnd) return;
SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG)menu_ownerdraw_wnd_proc);
hmenu = CreatePopupMenu();
ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError());
if( !hmenu) { DestroyWindow(hwnd);return;}
k=0;
for( j=0;j<2;j++) /* create columns */
@ -262,11 +262,11 @@ static void test_menu_ownerdraw(void)
"item rectangles are not separated by 4 pixels space\n");
/* height should be what the MEASUREITEM message has returned */
ok( MOD_rc[0].bottom - MOD_rc[0].top == MOD_SIZE,
"menu item has wrong height: %ld should be %d\n",
"menu item has wrong height: %d should be %d\n",
MOD_rc[0].bottom - MOD_rc[0].top, MOD_SIZE);
/* no gaps between the rows */
ok( MOD_rc[0].bottom - MOD_rc[1].top == 0,
"There should not be a space between the rows, gap is %ld\n",
"There should not be a space between the rows, gap is %d\n",
MOD_rc[0].bottom - MOD_rc[1].top);
/* test the correct value of the item height that was sent
* by the WM_MEASUREITEM message */
@ -282,22 +282,22 @@ static void test_menu_ownerdraw(void)
ret = TrackPopupMenu( hmenu, 0x100, 100,100, 0, hwnd, NULL);
/* left should be 4 pixels less now */
ok( leftcol == MOD_rc[0].left + 4,
"columns should be 4 pixels to the left (actual %ld).\n",
"columns should be 4 pixels to the left (actual %d).\n",
leftcol - MOD_rc[0].left);
/* test width */
ok( MOD_rc[0].right - MOD_rc[0].left == 2 * MOD_avec + MOD_SIZE,
"width of owner drawn menu item is wrong. Got %ld expected %d\n",
"width of owner drawn menu item is wrong. Got %d expected %d\n",
MOD_rc[0].right - MOD_rc[0].left , 2*MOD_avec + MOD_SIZE);
/* and height */
ok( MOD_rc[0].bottom - MOD_rc[0].top == MOD_SIZE,
"Height is incorrect. Got %ld expected %d\n",
"Height is incorrect. Got %d expected %d\n",
MOD_rc[0].bottom - MOD_rc[0].top, MOD_SIZE);
/* test width/height of an ownerdraw menu bar as well */
ret = DestroyMenu(hmenu);
ok(ret, "DestroyMenu failed with error %ld\n", GetLastError());
ok(ret, "DestroyMenu failed with error %d\n", GetLastError());
hmenu = CreateMenu();
ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError());
if( !hmenu) { DestroyWindow(hwnd);return;}
MOD_maxid=1;
for(i=0;i<2;i++) {
@ -306,19 +306,19 @@ static void test_menu_ownerdraw(void)
}
ret = SetMenu( hwnd, hmenu);
UpdateWindow( hwnd); /* hack for wine to draw the window + menu */
ok(ret, "SetMenu failed with error %ld\n", GetLastError());
ok(ret, "SetMenu failed with error %d\n", GetLastError());
/* test width */
ok( MOD_rc[0].right - MOD_rc[0].left == 2 * MOD_avec + MOD_SIZE,
"width of owner drawn menu item is wrong. Got %ld expected %d\n",
"width of owner drawn menu item is wrong. Got %d expected %d\n",
MOD_rc[0].right - MOD_rc[0].left , 2*MOD_avec + MOD_SIZE);
/* test hight */
ok( MOD_rc[0].bottom - MOD_rc[0].top == GetSystemMetrics( SM_CYMENU) - 1,
"Height of owner drawn menu item is wrong. Got %ld expected %d\n",
"Height of owner drawn menu item is wrong. Got %d expected %d\n",
MOD_rc[0].bottom - MOD_rc[0].top, GetSystemMetrics( SM_CYMENU) - 1);
/* clean up */
ret = DestroyMenu(hmenu);
ok(ret, "DestroyMenu failed with error %ld\n", GetLastError());
ok(ret, "DestroyMenu failed with error %d\n", GetLastError());
DestroyWindow(hwnd);
}
@ -359,12 +359,12 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
mii.hbmpItem = hbmp;
}
submenu = CreateMenu();
ok( submenu != 0, "CreateMenu failed with error %ld\n", GetLastError());
ok( submenu != 0, "CreateMenu failed with error %d\n", GetLastError());
if( ispop)
hmenu = CreatePopupMenu();
else
hmenu = CreateMenu();
ok( hmenu != 0, "Create{Popup}Menu failed with error %ld\n", GetLastError());
ok( hmenu != 0, "Create{Popup}Menu failed with error %d\n", GetLastError());
if( hassub) {
mii.fMask |= MIIM_SUBMENU;
mii.hSubMenu = submenu;
@ -375,10 +375,10 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
pGetMenuInfo( hmenu, &mi);
mi.dwStyle |= mnuopt == 1 ? MNS_NOCHECK : MNS_CHECKORBMP;
ret = pSetMenuInfo( hmenu, &mi);
ok( ret, "SetMenuInfo failed with error %ld\n", GetLastError());
ok( ret, "SetMenuInfo failed with error %d\n", GetLastError());
}
ret = InsertMenuItem( hmenu, 0, FALSE, &mii);
ok( ret, "InsertMenuItem failed with error %ld\n", GetLastError());
ok( ret, "InsertMenuItem failed with error %d\n", GetLastError());
failed = !ret;
if( winetest_debug) {
HDC hdc=GetDC(hwnd);
@ -394,7 +394,7 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
ret = TrackPopupMenu( hmenu, 0x100, 100,100, 0, hwnd, NULL);
else {
ret = SetMenu( hwnd, hmenu);
ok(ret, "SetMenu failed with error %ld\n", GetLastError());
ok(ret, "SetMenu failed with error %d\n", GetLastError());
DrawMenuBar( hwnd);
}
ret = GetMenuItemRect( hwnd, hmenu, 0, &rc);
@ -412,7 +412,7 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
( hbmp ? (text ? 2:0) + bmpsize.cx : 0 ) +
(text ? 2 * MOD_avec + (text[0] ? size.cx :0): 0) ;
ok( rc.right - rc.left == expect,
"menu width wrong, got %ld expected %d\n", rc.right - rc.left, expect);
"menu width wrong, got %d expected %d\n", rc.right - rc.left, expect);
failed = failed || !(rc.right - rc.left == expect);
/* check menu height */
if( ispop)
@ -423,7 +423,7 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
expect = ( !(text || hbmp) ? GetSystemMetrics( SM_CYMENUSIZE)/2 :
max( GetSystemMetrics( SM_CYMENU) - 1, (hbmp ? bmpsize.cy : 0)));
ok( rc.bottom - rc.top == expect,
"menu height wrong, got %ld expected %d (%d)\n",
"menu height wrong, got %d expected %d (%d)\n",
rc.bottom - rc.top, expect, GetSystemMetrics( SM_CYMENU));
failed = failed || !(rc.bottom - rc.top == expect);
if( hbmp == HBMMENU_CALLBACK && MOD_GotDrawItemMsg) {
@ -432,32 +432,32 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
expect = ispop ? (4 + ( mnuopt ? 0 : GetSystemMetrics(SM_CXMENUCHECK)))
: 3;
ok( expect == MOD_rc[0].left,
"bitmap left is %ld expected %d\n", MOD_rc[0].left, expect);
"bitmap left is %d expected %d\n", MOD_rc[0].left, expect);
failed = failed || !(expect == MOD_rc[0].left);
/* vertical */
expect = (rc.bottom - rc.top - MOD_rc[0].bottom + MOD_rc[0].top) / 2;
ok( expect == MOD_rc[0].top,
"bitmap top is %ld expected %d\n", MOD_rc[0].top, expect);
"bitmap top is %d expected %d\n", MOD_rc[0].top, expect);
failed = failed || !(expect == MOD_rc[0].top);
}
/* if there was a failure, report details */
if( failed) {
trace("*** count %d text \"%s\" bitmap %p bmsize %ld,%ld textsize %ld+%ld,%ld mnuopt %d hastab %d\n",
trace("*** count %d text \"%s\" bitmap %p bmsize %d,%d textsize %d+%d,%d mnuopt %d hastab %d\n",
count, text ? text: "(nil)", hbmp, bmpsize.cx, bmpsize.cy,
size.cx, size.cy, sc_size.cx, mnuopt, hastab);
trace(" check %d,%d arrow %d avechar %d\n",
GetSystemMetrics(SM_CXMENUCHECK ),
GetSystemMetrics(SM_CYMENUCHECK ),arrowwidth, MOD_avec);
if( hbmp == HBMMENU_CALLBACK)
trace( " rc %ld,%ld-%ld,%ld bmp.rc %ld,%ld-%ld,%ld\n",
trace( " rc %d,%d-%d,%d bmp.rc %d,%d-%d,%d\n",
rc.left, rc.top, rc.top, rc.bottom, MOD_rc[0].left,
MOD_rc[0].top,MOD_rc[0].right, MOD_rc[0].bottom);
}
/* clean up */
ret = DestroyMenu(submenu);
ok(ret, "DestroyMenu failed with error %ld\n", GetLastError());
ok(ret, "DestroyMenu failed with error %d\n", GetLastError());
ret = DestroyMenu(hmenu);
ok(ret, "DestroyMenu failed with error %ld\n", GetLastError());
ok(ret, "DestroyMenu failed with error %d\n", GetLastError());
}
@ -480,7 +480,7 @@ static void test_menu_bmp_and_string(void)
GetObject( hbm_arrow, sizeof(bm), &bm);
arrowwidth = bm.bmWidth;
ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
if( !hwnd) return;
SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG)menu_ownerdraw_wnd_proc);
@ -496,7 +496,7 @@ static void test_menu_bmp_and_string(void)
for( szidx=0; szidx < sizeof( bmsizes) / sizeof( SIZE); szidx++) {
HBITMAP hbm = CreateBitmap( bmsizes[szidx].cx, bmsizes[szidx].cy,1,1,bmfill);
HBITMAP bitmaps[] = { HBMMENU_CALLBACK, hbm, NULL };
ok( (int)hbm, "CreateBitmap failed err %ld\n", GetLastError());
ok( (int)hbm, "CreateBitmap failed err %d\n", GetLastError());
for( txtidx = 0; txtidx < sizeof(MOD_txtsizes)/sizeof(MOD_txtsizes[0]); txtidx++) {
for( hassub = 0; hassub < 2 ; hassub++) { /* add submenu item */
for( mnuopt = 0; mnuopt < 3 ; mnuopt++){ /* test MNS_NOCHECK/MNS_CHECKORBMP */
@ -684,7 +684,7 @@ static WCHAR *strcpyW( WCHAR *dst, const WCHAR *src )
else ret = InsertMenuItemW(hmenu, 0, TRUE, (MENUITEMINFOW*)&info1 );\
if( !(eret1)) { ok( (eret1)==ret,"InsertMenuItem should have failed.\n");\
stop = TRUE;\
} else ok( (eret1)==ret,"InsertMenuItem failed, err %ld\n",GetLastError());\
} else ok( (eret1)==ret,"InsertMenuItem failed, err %d\n",GetLastError());\
/* GetMenuItemInfo + GetMenuString */
@ -702,7 +702,7 @@ static WCHAR *strcpyW( WCHAR *dst, const WCHAR *src )
GetMenuItemInfoW( hmenu, 0, TRUE, info2W );\
if( !(eret2)) ok( (eret2)==ret,"GetMenuItemInfo should have failed.\n");\
else { \
ok( (eret2)==ret,"GetMenuItemInfo failed, err %ld\n",GetLastError());\
ok( (eret2)==ret,"GetMenuItemInfo failed, err %d\n",GetLastError());\
ret = memcmp( info2, einfo, sizeof einfoA);\
/* ok( ret==0, "Got wrong menu item info data\n");*/\
if( ret) DUMPMIINF(info2A.cbSize, &info2A, &einfoA)\
@ -714,7 +714,7 @@ static WCHAR *strcpyW( WCHAR *dst, const WCHAR *src )
ret = ansi ? GetMenuStringA( hmenu, 0, string, 80, MF_BYPOSITION) :\
GetMenuStringW( hmenu, 0, string, 80, MF_BYPOSITION);\
if( (eret3)){\
ok( ret, "GetMenuString failed, err %ld\n",GetLastError());\
ok( ret, "GetMenuString failed, err %d\n",GetLastError());\
}else\
ok( !ret, "GetMenuString should have failed\n");\
}\
@ -734,7 +734,7 @@ if( !stop) {\
if(ansi)ret = ModifyMenuA( hmenu, 0, flags, (UINT_PTR)id, (char*)data);\
else ret = ModifyMenuW( hmenu, 0, flags, (UINT_PTR)id, (WCHAR*)data);\
if( !(eret)) ok( (eret)==ret,"ModifyMenuA should have failed.\n");\
else ok( (eret)==ret,"ModifyMenuA failed, err %ld\n",GetLastError());\
else ok( (eret)==ret,"ModifyMenuA failed, err %d\n",GetLastError());\
}
/* SetMenuItemInfo */
@ -749,7 +749,7 @@ if( !stop) {\
else ret = SetMenuItemInfoW(hmenu, 0, TRUE, (MENUITEMINFOW*)&info1 );\
if( !(eret1)) { ok( (eret1)==ret,"InsertMenuItem should have failed.\n");\
stop = TRUE;\
} else ok( (eret1)==ret,"InsertMenuItem failed, err %ld\n",GetLastError());\
} else ok( (eret1)==ret,"InsertMenuItem failed, err %d\n",GetLastError());\
}

View File

@ -80,7 +80,7 @@ static void test_enumdisplaydevices(void)
{
/* test creating DC */
dc = CreateDCA(dd.DeviceName, NULL, NULL, NULL);
ok(dc != NULL, "Failed to CreateDC(\"%s\") err=%ld\n", dd.DeviceName, GetLastError());
ok(dc != NULL, "Failed to CreateDC(\"%s\") err=%d\n", dd.DeviceName, GetLastError());
DeleteDC(dc);
}
num++;
@ -140,10 +140,10 @@ static void test_ChangeDisplaySettingsEx(void)
dm.dmDisplayFrequency = vid_modes_test[i].freq;
dm.dmFields = vid_modes_test[i].fields;
res = ChangeDisplaySettingsEx(NULL, &dm, NULL, CDS_FULLSCREEN, NULL);
ok(res == vid_modes_test[i].res, "Failed to change resolution[%d]: %ld\n", i, res);
ok(res == vid_modes_test[i].res, "Failed to change resolution[%d]: %d\n", i, res);
}
res = ChangeDisplaySettingsEx(NULL, NULL, NULL, CDS_RESET, NULL);
ok(res == DISP_CHANGE_SUCCESSFUL, "Failed to reset default resolution: %ld\n", res);
ok(res == DISP_CHANGE_SUCCESSFUL, "Failed to reset default resolution: %d\n", res);
}

View File

@ -3062,30 +3062,30 @@ static void test_hv_scroll_1(HWND hwnd, INT ctl, DWORD clear, DWORD set, INT min
/* do not be confused by WS_DLGFRAME set */
if ((style & WS_CAPTION) == WS_CAPTION) style &= ~WS_CAPTION;
if (clear) ok(style & clear, "style %08lx should be set\n", clear);
if (set) ok(!(style & set), "style %08lx should not be set\n", set);
if (clear) ok(style & clear, "style %08x should be set\n", clear);
if (set) ok(!(style & set), "style %08x should not be set\n", set);
ret = SetScrollRange(hwnd, ctl, min, max, FALSE);
ok( ret, "SetScrollRange(%d) error %ld\n", ctl, GetLastError());
ok( ret, "SetScrollRange(%d) error %d\n", ctl, GetLastError());
if ((style & (WS_DLGFRAME | WS_BORDER | WS_THICKFRAME)) || (exstyle & WS_EX_DLGMODALFRAME))
ok_sequence(WmSetScrollRangeHV_NC_Seq, "SetScrollRange(SB_HORZ/SB_VERT) NC", FALSE);
else
ok_sequence(WmSetScrollRangeHVSeq, "SetScrollRange(SB_HORZ/SB_VERT)", FALSE);
style = GetWindowLongA(hwnd, GWL_STYLE);
if (set) ok(style & set, "style %08lx should be set\n", set);
if (clear) ok(!(style & clear), "style %08lx should not be set\n", clear);
if (set) ok(style & set, "style %08x should be set\n", set);
if (clear) ok(!(style & clear), "style %08x should not be set\n", clear);
/* a subsequent call should do nothing */
ret = SetScrollRange(hwnd, ctl, min, max, FALSE);
ok( ret, "SetScrollRange(%d) error %ld\n", ctl, GetLastError());
ok( ret, "SetScrollRange(%d) error %d\n", ctl, GetLastError());
ok_sequence(WmEmptySeq, "SetScrollRange(SB_HORZ/SB_VERT) empty sequence", FALSE);
xmin = 0xdeadbeef;
xmax = 0xdeadbeef;
trace("Ignore GetScrollRange error below if you are on Win9x\n");
ret = GetScrollRange(hwnd, ctl, &xmin, &xmax);
ok( ret, "GetScrollRange(%d) error %ld\n", ctl, GetLastError());
ok( ret, "GetScrollRange(%d) error %d\n", ctl, GetLastError());
ok_sequence(WmEmptySeq, "GetScrollRange(SB_HORZ/SB_VERT) empty sequence", FALSE);
ok(xmin == min, "unexpected min scroll value %d\n", xmin);
ok(xmax == max, "unexpected max scroll value %d\n", xmax);
@ -3102,8 +3102,8 @@ static void test_hv_scroll_2(HWND hwnd, INT ctl, DWORD clear, DWORD set, INT min
/* do not be confused by WS_DLGFRAME set */
if ((style & WS_CAPTION) == WS_CAPTION) style &= ~WS_CAPTION;
if (clear) ok(style & clear, "style %08lx should be set\n", clear);
if (set) ok(!(style & set), "style %08lx should not be set\n", set);
if (clear) ok(style & clear, "style %08x should be set\n", clear);
if (set) ok(!(style & set), "style %08x should not be set\n", set);
si.cbSize = sizeof(si);
si.fMask = SIF_RANGE;
@ -3116,8 +3116,8 @@ static void test_hv_scroll_2(HWND hwnd, INT ctl, DWORD clear, DWORD set, INT min
ok_sequence(WmSetScrollRangeHVSeq, "SetScrollInfo(SB_HORZ/SB_VERT)", FALSE);
style = GetWindowLongA(hwnd, GWL_STYLE);
if (set) ok(style & set, "style %08lx should be set\n", set);
if (clear) ok(!(style & clear), "style %08lx should not be set\n", clear);
if (set) ok(style & set, "style %08x should be set\n", set);
if (clear) ok(!(style & clear), "style %08x should not be set\n", clear);
/* a subsequent call should do nothing */
SetScrollInfo(hwnd, ctl, &si, TRUE);
@ -3142,7 +3142,7 @@ static void test_hv_scroll_2(HWND hwnd, INT ctl, DWORD clear, DWORD set, INT min
si.nMin = 0xdeadbeef;
si.nMax = 0xdeadbeef;
ret = GetScrollInfo(hwnd, ctl, &si);
ok( ret, "GetScrollInfo error %ld\n", GetLastError());
ok( ret, "GetScrollInfo error %d\n", GetLastError());
ok_sequence(WmEmptySeq, "GetScrollRange(SB_HORZ/SB_VERT) empty sequence", FALSE);
ok(si.nMin == min, "unexpected min scroll value %d\n", si.nMin);
ok(si.nMax == max, "unexpected max scroll value %d\n", si.nMax);
@ -3158,14 +3158,14 @@ static void test_scroll_messages(HWND hwnd)
min = 0xdeadbeef;
max = 0xdeadbeef;
ret = GetScrollRange(hwnd, SB_CTL, &min, &max);
ok( ret, "GetScrollRange error %ld\n", GetLastError());
ok( ret, "GetScrollRange error %d\n", GetLastError());
if (sequence->message != WmGetScrollRangeSeq[0].message)
trace("GetScrollRange(SB_CTL) generated unknown message %04x\n", sequence->message);
/* values of min and max are undefined */
flush_sequence();
ret = SetScrollRange(hwnd, SB_CTL, 10, 150, FALSE);
ok( ret, "SetScrollRange error %ld\n", GetLastError());
ok( ret, "SetScrollRange error %d\n", GetLastError());
if (sequence->message != WmSetScrollRangeSeq[0].message)
trace("SetScrollRange(SB_CTL) generated unknown message %04x\n", sequence->message);
flush_sequence();
@ -3173,7 +3173,7 @@ static void test_scroll_messages(HWND hwnd)
min = 0xdeadbeef;
max = 0xdeadbeef;
ret = GetScrollRange(hwnd, SB_CTL, &min, &max);
ok( ret, "GetScrollRange error %ld\n", GetLastError());
ok( ret, "GetScrollRange error %d\n", GetLastError());
if (sequence->message != WmGetScrollRangeSeq[0].message)
trace("GetScrollRange(SB_CTL) generated unknown message %04x\n", sequence->message);
/* values of min and max are undefined */
@ -3206,7 +3206,7 @@ static void test_scroll_messages(HWND hwnd)
si.nMin = 0xdeadbeef;
si.nMax = 0xdeadbeef;
ret = GetScrollInfo(hwnd, SB_CTL, &si);
ok( ret, "GetScrollInfo error %ld\n", GetLastError());
ok( ret, "GetScrollInfo error %d\n", GetLastError());
if (sequence->message != WmGetScrollInfoSeq[0].message)
trace("GetScrollInfo(SB_CTL) generated unknown message %04x\n", sequence->message);
/* values of min and max are undefined */
@ -3314,7 +3314,7 @@ static void test_showwindow(void)
GetWindowRect(hwnd, &rc);
ok( rc.right-rc.left == GetSystemMetrics(SM_CXSCREEN) &&
rc.bottom-rc.top == GetSystemMetrics(SM_CYSCREEN),
"Invalid maximized size before ShowWindow (%ld,%ld)-(%ld,%ld)\n",
"Invalid maximized size before ShowWindow (%d,%d)-(%d,%d)\n",
rc.left, rc.top, rc.right, rc.bottom);
/* Reset window's size & position */
SetWindowPos(hwnd, 0, 10, 10, 200, 200, SWP_NOZORDER | SWP_NOACTIVATE);
@ -3330,7 +3330,7 @@ static void test_showwindow(void)
GetWindowRect(hwnd, &rc);
ok( rc.right-rc.left == GetSystemMetrics(SM_CXSCREEN) &&
rc.bottom-rc.top == GetSystemMetrics(SM_CYSCREEN),
"Invalid maximized size after ShowWindow (%ld,%ld)-(%ld,%ld)\n",
"Invalid maximized size after ShowWindow (%d,%d)-(%d,%d)\n",
rc.left, rc.top, rc.right, rc.bottom);
DestroyWindow(hwnd);
flush_sequence();
@ -3396,7 +3396,7 @@ static void test_sys_menu(HWND hwnd)
/* test existing window without CS_NOCLOSE style */
hmenu = GetSystemMenu(hwnd, FALSE);
ok(hmenu != 0, "GetSystemMenu error %ld\n", GetLastError());
ok(hmenu != 0, "GetSystemMenu error %d\n", GetLastError());
state = GetMenuState(hmenu, SC_CLOSE, MF_BYCOMMAND);
ok(state != 0xffffffff, "wrong SC_CLOSE state %x\n", state);
@ -3422,7 +3422,7 @@ static void test_sys_menu(HWND hwnd)
ok (hwnd != 0, "Failed to create overlapped window\n");
hmenu = GetSystemMenu(hwnd, FALSE);
ok(hmenu != 0, "GetSystemMenu error %ld\n", GetLastError());
ok(hmenu != 0, "GetSystemMenu error %d\n", GetLastError());
state = GetMenuState(hmenu, SC_CLOSE, MF_BYCOMMAND);
ok(state == 0xffffffff, "wrong SC_CLOSE state %x\n", state);
@ -3724,18 +3724,18 @@ static void test_messages(void)
/* MsgWaitForMultipleObjects test */
ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE);
ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %lx\n", ret);
ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %x\n", ret);
PostMessageA(hparent, WM_USER, 0, 0);
ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE);
ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %lx\n", ret);
ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %x\n", ret);
ok(PeekMessageW( &msg, 0, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n");
ok(msg.message == WM_USER, "got %04x instead of WM_USER\n", msg.message);
ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE);
ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %lx\n", ret);
ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %x\n", ret);
/* end of MsgWaitForMultipleObjects test */
/* the following test causes an exception in user.exe under win9x */
@ -3746,7 +3746,7 @@ static void test_messages(void)
ok( !PeekMessageW( NULL, 0, 0, 0, PM_REMOVE ), "PeekMessage(NULL) should fail\n" );
ok( GetLastError() == ERROR_NOACCESS || /* Win2k */
GetLastError() == 0xdeadbeef, /* NT4 */
"last error is %ld\n", GetLastError() );
"last error is %d\n", GetLastError() );
ok( PeekMessageW( &msg, 0, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n" );
ok( msg.message == WM_USER+1, "got %x instead of WM_USER+1\n", msg.message );
@ -4057,14 +4057,14 @@ static void test_button_messages(void)
ok(hwnd != 0, "Failed to create button window\n");
dlg_code = SendMessageA(hwnd, WM_GETDLGCODE, 0, 0);
ok(dlg_code == button[i].dlg_code, "%d: wrong dlg_code %08lx\n", i, dlg_code);
ok(dlg_code == button[i].dlg_code, "%d: wrong dlg_code %08x\n", i, dlg_code);
ShowWindow(hwnd, SW_SHOW);
UpdateWindow(hwnd);
SetFocus(0);
flush_sequence();
trace("button style %08lx\n", button[i].style);
trace("button style %08x\n", button[i].style);
SetFocus(hwnd);
ok_sequence(button[i].setfocus, "SetFocus(hwnd) on a button", FALSE);
@ -4105,9 +4105,9 @@ void dump_region(HRGN hrgn)
if (!(size = GetRegionData( hrgn, 0, NULL ))) return;
if (!(data = HeapAlloc( GetProcessHeap(), 0, size ))) return;
GetRegionData( hrgn, size, data );
printf("%ld rects:", data->rdh.nCount );
printf("%d rects:", data->rdh.nCount );
for (i = 0, rect = (RECT *)data->Buffer; i < data->rdh.nCount; i++, rect++)
printf( " (%ld,%ld)-(%ld,%ld)", rect->left, rect->top, rect->right, rect->bottom );
printf( " (%d,%d)-(%d,%d)", rect->left, rect->top, rect->right, rect->bottom );
printf("\n");
HeapFree( GetProcessHeap(), 0, data );
}
@ -4142,7 +4142,7 @@ static void check_update_rgn( HWND hwnd, HRGN hrgn )
GetRgnBox( update, &r1 );
GetUpdateRect( hwnd, &r2, FALSE );
ok( r1.left == r2.left && r1.top == r2.top && r1.right == r2.right && r1.bottom == r2.bottom,
"Rectangles are different: %ld,%ld-%ld,%ld / %ld,%ld-%ld,%ld\n",
"Rectangles are different: %d,%d-%d,%d / %d,%d-%d,%d\n",
r1.left, r1.top, r1.right, r1.bottom, r2.left, r2.top, r2.right, r2.bottom );
DeleteObject( tmp );
@ -4364,7 +4364,7 @@ static void test_paint_messages(void)
trace("testing InvalidateRgn(0, NULL, FALSE)\n");
SetLastError(0xdeadbeef);
ok(!InvalidateRgn(0, NULL, FALSE), "InvalidateRgn(0, NULL, FALSE) should fail\n");
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error code %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error code %d\n", GetLastError());
check_update_rgn( hwnd, 0 );
while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
ok_sequence( WmEmptySeq, "WmEmptySeq", FALSE );
@ -4372,7 +4372,7 @@ static void test_paint_messages(void)
trace("testing ValidateRgn(0, NULL)\n");
SetLastError(0xdeadbeef);
ok(!ValidateRgn(0, NULL), "ValidateRgn(0, NULL) should fail\n");
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error code %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error code %d\n", GetLastError());
check_update_rgn( hwnd, 0 );
while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
ok_sequence( WmEmptySeq, "WmEmptySeq", FALSE );
@ -4785,7 +4785,7 @@ static void test_interthread_messages(void)
}
hThread = CreateThread(NULL, 0, thread_proc, &wnd_event, 0, &tid);
ok(hThread != NULL, "CreateThread failed, error %ld\n", GetLastError());
ok(hThread != NULL, "CreateThread failed, error %d\n", GetLastError());
ok(WaitForSingleObject(wnd_event.event, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
@ -4793,16 +4793,16 @@ static void test_interthread_messages(void)
SetLastError(0xdeadbeef);
ok(!DestroyWindow(wnd_event.hwnd), "DestroyWindow succeded\n");
ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error code %ld\n", GetLastError());
ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error code %d\n", GetLastError());
proc = (WNDPROC)GetWindowLongPtrA(wnd_event.hwnd, GWLP_WNDPROC);
ok(proc != NULL, "GetWindowLongPtrA(GWLP_WNDPROC) error %ld\n", GetLastError());
ok(proc != NULL, "GetWindowLongPtrA(GWLP_WNDPROC) error %d\n", GetLastError());
expected_len = lstrlenA("window caption text");
memset(buf, 0, sizeof(buf));
SetLastError(0xdeadbeef);
len = CallWindowProcA(proc, wnd_event.hwnd, WM_GETTEXT, sizeof(buf), (LPARAM)buf);
ok(len == expected_len, "CallWindowProcA(WM_GETTEXT) error %ld, len %d, expected len %d\n", GetLastError(), len, expected_len);
ok(len == expected_len, "CallWindowProcA(WM_GETTEXT) error %d, len %d, expected len %d\n", GetLastError(), len, expected_len);
ok(!lstrcmpA(buf, "window caption text"), "window text mismatch\n");
msg.hwnd = wnd_event.hwnd;
@ -4813,7 +4813,7 @@ static void test_interthread_messages(void)
SetLastError(0xdeadbeef);
len = DispatchMessageA(&msg);
ok(!len && GetLastError() == ERROR_MESSAGE_SYNC_ONLY,
"DispatchMessageA(WM_GETTEXT) succeded on another thread window: ret %d, error %ld\n", len, GetLastError());
"DispatchMessageA(WM_GETTEXT) succeded on another thread window: ret %d, error %d\n", len, GetLastError());
/* the following test causes an exception in user.exe under win9x */
msg.hwnd = wnd_event.hwnd;
@ -4823,10 +4823,10 @@ static void test_interthread_messages(void)
SetLastError(0xdeadbeef);
len = DispatchMessageA(&msg);
ok(!len && GetLastError() == 0xdeadbeef,
"DispatchMessageA(WM_TIMER) failed on another thread window: ret %d, error %ld\n", len, GetLastError());
"DispatchMessageA(WM_TIMER) failed on another thread window: ret %d, error %d\n", len, GetLastError());
ret = PostMessageA(wnd_event.hwnd, WM_QUIT, 0, 0);
ok( ret, "PostMessageA(WM_QUIT) error %ld\n", GetLastError());
ok( ret, "PostMessageA(WM_QUIT) error %d\n", GetLastError());
ok(WaitForSingleObject(hThread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
CloseHandle(hThread);
@ -5120,7 +5120,7 @@ static void test_accelerators(void)
ok_sequence(WmCtrlAltVkN, "Ctrl+Alt+VK_N press/release 1", FALSE);
ret = DestroyAcceleratorTable(hAccel);
ok( ret, "DestroyAcceleratorTable error %ld\n", GetLastError());
ok( ret, "DestroyAcceleratorTable error %d\n", GetLastError());
hAccel = LoadAccelerators(GetModuleHandleA(0), MAKEINTRESOURCE(2));
assert(hAccel != 0);
@ -5195,7 +5195,7 @@ static void test_accelerators(void)
ok_sequence(WmCtrlAltShiftVkN, "Ctrl+Alt+Shift+VK_N press/release", FALSE);
ret = DestroyAcceleratorTable(hAccel);
ok( ret, "DestroyAcceleratorTable error %ld\n", GetLastError());
ok( ret, "DestroyAcceleratorTable error %d\n", GetLastError());
trace("testing Alt press/release\n");
flush_sequence();
@ -5342,22 +5342,22 @@ static LRESULT MsgCheckProc (BOOL unicode, HWND hwnd, UINT message,
MINMAXINFO *minmax = (MINMAXINFO *)lParam;
GetClientRect(parent, &rc);
trace("parent %p client size = (%ld x %ld)\n", parent, rc.right, rc.bottom);
trace("parent %p client size = (%d x %d)\n", parent, rc.right, rc.bottom);
trace("ptReserved = (%ld,%ld)\n"
"ptMaxSize = (%ld,%ld)\n"
"ptMaxPosition = (%ld,%ld)\n"
"ptMinTrackSize = (%ld,%ld)\n"
"ptMaxTrackSize = (%ld,%ld)\n",
trace("ptReserved = (%d,%d)\n"
"ptMaxSize = (%d,%d)\n"
"ptMaxPosition = (%d,%d)\n"
"ptMinTrackSize = (%d,%d)\n"
"ptMaxTrackSize = (%d,%d)\n",
minmax->ptReserved.x, minmax->ptReserved.y,
minmax->ptMaxSize.x, minmax->ptMaxSize.y,
minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
minmax->ptMinTrackSize.x, minmax->ptMinTrackSize.y,
minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y);
ok(minmax->ptMaxSize.x == rc.right, "default width of maximized child %ld != %ld\n",
ok(minmax->ptMaxSize.x == rc.right, "default width of maximized child %d != %d\n",
minmax->ptMaxSize.x, rc.right);
ok(minmax->ptMaxSize.y == rc.bottom, "default height of maximized child %ld != %ld\n",
ok(minmax->ptMaxSize.y == rc.bottom, "default height of maximized child %d != %d\n",
minmax->ptMaxSize.y, rc.bottom);
}
@ -5445,7 +5445,7 @@ static LRESULT WINAPI ParentMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam
RECT rc;
INT ret = GetClipBox((HDC)wParam, &rc);
trace("WM_ERASEBKGND: GetClipBox()=%d, (%ld,%ld-%ld,%ld)\n",
trace("WM_ERASEBKGND: GetClipBox()=%d, (%d,%d-%d,%d)\n",
ret, rc.left, rc.top, rc.right, rc.bottom);
break;
}
@ -5680,7 +5680,7 @@ static void CALLBACK win_event_proc(HWINEVENTHOOK hevent,
{
char buf[256];
trace("WEH:%p,event %08lx,hwnd %p,obj %08lx,id %08lx,thread %08lx,time %08lx\n",
trace("WEH:%p,event %08x,hwnd %p,obj %08x,id %08x,thread %08x,time %08x\n",
hevent, event, hwnd, object_id, child_id, thread_id, event_time);
ok(thread_id == GetCurrentThreadId(), "we didn't ask for events from other threads\n");
@ -5827,35 +5827,35 @@ static void test_message_conversion(void)
SetLastError(0);
lRes = PostMessageA(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode);
ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER),
"PostMessage on sync only message returned %ld, last error %ld\n", lRes, GetLastError());
"PostMessage on sync only message returned %ld, last error %d\n", lRes, GetLastError());
SetLastError(0);
lRes = PostMessageW(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode);
ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER),
"PostMessage on sync only message returned %ld, last error %ld\n", lRes, GetLastError());
"PostMessage on sync only message returned %ld, last error %d\n", lRes, GetLastError());
SetLastError(0);
lRes = PostThreadMessageA(GetCurrentThreadId(), CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode);
ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER),
"PosThreadtMessage on sync only message returned %ld, last error %ld\n", lRes, GetLastError());
"PosThreadtMessage on sync only message returned %ld, last error %d\n", lRes, GetLastError());
SetLastError(0);
lRes = PostThreadMessageW(GetCurrentThreadId(), CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode);
ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER),
"PosThreadtMessage on sync only message returned %ld, last error %ld\n", lRes, GetLastError());
"PosThreadtMessage on sync only message returned %ld, last error %d\n", lRes, GetLastError());
SetLastError(0);
lRes = SendNotifyMessageA(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode);
ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER),
"SendNotifyMessage on sync only message returned %ld, last error %ld\n", lRes, GetLastError());
"SendNotifyMessage on sync only message returned %ld, last error %d\n", lRes, GetLastError());
SetLastError(0);
lRes = SendNotifyMessageW(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode);
ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER),
"SendNotifyMessage on sync only message returned %ld, last error %ld\n", lRes, GetLastError());
"SendNotifyMessage on sync only message returned %ld, last error %d\n", lRes, GetLastError());
SetLastError(0);
lRes = SendMessageCallbackA(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode, NULL, 0);
ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER),
"SendMessageCallback on sync only message returned %ld, last error %ld\n", lRes, GetLastError());
"SendMessageCallback on sync only message returned %ld, last error %d\n", lRes, GetLastError());
SetLastError(0);
lRes = SendMessageCallbackW(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode, NULL, 0);
ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER),
"SendMessageCallback on sync only message returned %ld, last error %ld\n", lRes, GetLastError());
"SendMessageCallback on sync only message returned %ld, last error %d\n", lRes, GetLastError());
/* Check WM_GETTEXTLENGTH A->W behaviour, whether WM_GETTEXT is also sent or not */
@ -5890,7 +5890,7 @@ static void test_message_conversion(void)
"got bad length %ld\n", lRes );
ret = DestroyWindow(hwnd);
ok( ret, "DestroyWindow() error %ld\n", GetLastError());
ok( ret, "DestroyWindow() error %d\n", GetLastError());
}
struct timer_info
@ -6034,7 +6034,7 @@ static void CALLBACK win_event_global_hook_proc(HWINEVENTHOOK hevent,
{
char buf[256];
trace("WEH_2:%p,event %08lx,hwnd %p,obj %08lx,id %08lx,thread %08lx,time %08lx\n",
trace("WEH_2:%p,event %08x,hwnd %p,obj %08x,id %08x,thread %08x,time %08x\n",
hevent, event, hwnd, object_id, child_id, thread_id, event_time);
if (GetClassNameA(hwnd, buf, sizeof(buf)))
@ -6239,7 +6239,7 @@ static void test_winevents(void)
hwnd2 = (HWND)hevent;
hthread = CreateThread(NULL, 0, cbt_global_hook_thread_proc, &hwnd2, 0, &tid);
ok(hthread != NULL, "CreateThread failed, error %ld\n", GetLastError());
ok(hthread != NULL, "CreateThread failed, error %d\n", GetLastError());
ok(WaitForSingleObject(hevent, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
@ -6254,7 +6254,7 @@ static void test_winevents(void)
ok_sequence(WmGlobalHookSeq_2, "global hook 2", FALSE);
ret = UnhookWindowsHookEx(hCBT_global_hook);
ok( ret, "UnhookWindowsHookEx error %ld\n", GetLastError());
ok( ret, "UnhookWindowsHookEx error %d\n", GetLastError());
PostThreadMessageA(tid, WM_QUIT, 0, 0);
ok(WaitForSingleObject(hthread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
@ -6293,14 +6293,14 @@ static void test_winevents(void)
GetModuleHandleA(0), win_event_global_hook_proc,
GetCurrentProcessId(), 0,
WINEVENT_INCONTEXT);
ok(hhook != 0, "SetWinEventHook error %ld\n", GetLastError());
ok(hhook != 0, "SetWinEventHook error %d\n", GetLastError());
hevent = CreateEventA(NULL, 0, 0, NULL);
assert(hevent);
hwnd2 = (HWND)hevent;
hthread = CreateThread(NULL, 0, win_event_global_thread_proc, &hwnd2, 0, &tid);
ok(hthread != NULL, "CreateThread failed, error %ld\n", GetLastError());
ok(hthread != NULL, "CreateThread failed, error %d\n", GetLastError());
ok(WaitForSingleObject(hevent, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
@ -6316,7 +6316,7 @@ static void test_winevents(void)
ok_sequence(WmWinEventCaretSeq, "caret winevent", FALSE);
ret = pUnhookWinEvent(hhook);
ok( ret, "UnhookWinEvent error %ld\n", GetLastError());
ok( ret, "UnhookWinEvent error %d\n", GetLastError());
PostThreadMessageA(tid, WM_QUIT, 0, 0);
ok(WaitForSingleObject(hthread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
@ -6331,7 +6331,7 @@ static void test_winevents(void)
0, win_event_global_hook_proc,
GetCurrentProcessId(), 0,
WINEVENT_OUTOFCONTEXT);
ok(hhook != 0, "SetWinEventHook error %ld\n", GetLastError());
ok(hhook != 0, "SetWinEventHook error %d\n", GetLastError());
hevent = CreateEventA(NULL, 0, 0, NULL);
assert(hevent);
@ -6340,7 +6340,7 @@ static void test_winevents(void)
flush_sequence();
hthread = CreateThread(NULL, 0, win_event_global_thread_proc, &hwnd2, 0, &tid);
ok(hthread != NULL, "CreateThread failed, error %ld\n", GetLastError());
ok(hthread != NULL, "CreateThread failed, error %d\n", GetLastError());
ok(WaitForSingleObject(hevent, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
@ -6362,7 +6362,7 @@ static void test_winevents(void)
ok_sequence(WmWinEventCaretSeq_2, "caret winevent for out of context proc", FALSE);
ret = pUnhookWinEvent(hhook);
ok( ret, "UnhookWinEvent error %ld\n", GetLastError());
ok( ret, "UnhookWinEvent error %d\n", GetLastError());
PostThreadMessageA(tid, WM_QUIT, 0, 0);
ok(WaitForSingleObject(hthread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
@ -6385,7 +6385,7 @@ static void test_winevents(void)
hwnd2 = (HWND)hevent;
hthread = CreateThread(NULL, 0, mouse_ll_global_thread_proc, &hwnd2, 0, &tid);
ok(hthread != NULL, "CreateThread failed, error %ld\n", GetLastError());
ok(hthread != NULL, "CreateThread failed, error %d\n", GetLastError());
while (WaitForSingleObject(hevent, 100) == WAIT_TIMEOUT)
while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
@ -6400,7 +6400,7 @@ static void test_winevents(void)
ok_sequence(WmMouseLLHookSeq, "MOUSE_LL hook same thread", FALSE);
ret = UnhookWindowsHookEx(hCBT_global_hook);
ok( ret, "UnhookWindowsHookEx error %ld\n", GetLastError());
ok( ret, "UnhookWindowsHookEx error %d\n", GetLastError());
PostThreadMessageA(tid, WM_QUIT, 0, 0);
ok(WaitForSingleObject(hthread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
@ -6438,13 +6438,13 @@ static void test_set_hook(void)
ok(!hhook, "SetWinEventHook with invalid proc should fail\n");
ok(GetLastError() == ERROR_INVALID_FILTER_PROC || /* Win2k */
GetLastError() == 0xdeadbeef, /* Win9x */
"unexpected error %ld\n", GetLastError());
"unexpected error %d\n", GetLastError());
SetLastError(0xdeadbeef);
ok(!UnhookWindowsHookEx((HHOOK)0xdeadbeef), "UnhookWindowsHookEx succeeded\n");
ok(GetLastError() == ERROR_INVALID_HOOK_HANDLE || /* Win2k */
GetLastError() == 0xdeadbeef, /* Win9x */
"unexpected error %ld\n", GetLastError());
"unexpected error %d\n", GetLastError());
if (!pSetWinEventHook || !pUnhookWinEvent) return;
@ -6455,7 +6455,7 @@ static void test_set_hook(void)
ok(!hwinevent_hook, "WINEVENT_INCONTEXT requires hModule != 0\n");
ok(GetLastError() == ERROR_HOOK_NEEDS_HMOD || /* Win2k */
GetLastError() == 0xdeadbeef, /* Win9x */
"unexpected error %ld\n", GetLastError());
"unexpected error %d\n", GetLastError());
/* even thread local incontext hooks require hmodule */
SetLastError(0xdeadbeef);
@ -6464,7 +6464,7 @@ static void test_set_hook(void)
ok(!hwinevent_hook, "WINEVENT_INCONTEXT requires hModule != 0\n");
ok(GetLastError() == ERROR_HOOK_NEEDS_HMOD || /* Win2k */
GetLastError() == 0xdeadbeef, /* Win9x */
"unexpected error %ld\n", GetLastError());
"unexpected error %d\n", GetLastError());
#if 0 /* these 3 tests don't pass under Win9x */
SetLastError(0xdeadbeef);
@ -6489,10 +6489,10 @@ static void test_set_hook(void)
SetLastError(0xdeadbeef);
hwinevent_hook = (HWINEVENTHOOK)pSetWinEventHook(0, 0,
0, win_event_proc, GetCurrentProcessId(), 0, WINEVENT_OUTOFCONTEXT);
ok(hwinevent_hook != 0, "SetWinEventHook error %ld\n", GetLastError());
ok(GetLastError() == 0xdeadbeef, "unexpected error %ld\n", GetLastError());
ok(hwinevent_hook != 0, "SetWinEventHook error %d\n", GetLastError());
ok(GetLastError() == 0xdeadbeef, "unexpected error %d\n", GetLastError());
ret = pUnhookWinEvent(hwinevent_hook);
ok( ret, "UnhookWinEvent error %ld\n", GetLastError());
ok( ret, "UnhookWinEvent error %d\n", GetLastError());
todo_wine {
/* This call succeeds under win2k SP4, but fails under Wine.
@ -6500,17 +6500,17 @@ todo_wine {
SetLastError(0xdeadbeef);
hwinevent_hook = (HWINEVENTHOOK)pSetWinEventHook(EVENT_MIN, EVENT_MAX,
0, win_event_proc, 0xdeadbeef, 0, WINEVENT_OUTOFCONTEXT);
ok(hwinevent_hook != 0, "SetWinEventHook error %ld\n", GetLastError());
ok(GetLastError() == 0xdeadbeef, "unexpected error %ld\n", GetLastError());
ok(hwinevent_hook != 0, "SetWinEventHook error %d\n", GetLastError());
ok(GetLastError() == 0xdeadbeef, "unexpected error %d\n", GetLastError());
ret = pUnhookWinEvent(hwinevent_hook);
ok( ret, "UnhookWinEvent error %ld\n", GetLastError());
ok( ret, "UnhookWinEvent error %d\n", GetLastError());
}
SetLastError(0xdeadbeef);
ok(!pUnhookWinEvent((HWINEVENTHOOK)0xdeadbeef), "UnhookWinEvent succeeded\n");
ok(GetLastError() == ERROR_INVALID_HANDLE || /* Win2k */
GetLastError() == 0xdeadbeef, /* Win9x */
"unexpected error %ld\n", GetLastError());
"unexpected error %d\n", GetLastError());
}
static const struct message ScrollWindowPaint1[] = {
@ -6711,7 +6711,7 @@ todo_wine {
test_DestroyWindow_flag = TRUE;
ret = DestroyWindow(parent);
ok( ret, "DestroyWindow() error %ld\n", GetLastError());
ok( ret, "DestroyWindow() error %d\n", GetLastError());
test_DestroyWindow_flag = FALSE;
ok_sequence(destroy_window_with_children, "destroy window with children", 0);
@ -6812,7 +6812,7 @@ static DWORD CALLBACK send_msg_thread( LPVOID arg )
{
struct sendmsg_info *info = arg;
info->ret = SendMessageTimeoutA( info->hwnd, WM_USER, 0, 0, 0, info->timeout, NULL );
if (!info->ret) ok( GetLastError() == ERROR_TIMEOUT, "unexpected error %ld\n", GetLastError());
if (!info->ret) ok( GetLastError() == ERROR_TIMEOUT, "unexpected error %d\n", GetLastError());
return 0;
}
@ -7054,7 +7054,7 @@ static void test_edit_messages(void)
ok(hwnd != 0, "Failed to create edit window\n");
dlg_code = SendMessageA(hwnd, WM_GETDLGCODE, 0, 0);
ok(dlg_code == (DLGC_WANTCHARS|DLGC_HASSETSEL|DLGC_WANTARROWS), "wrong dlg_code %08lx\n", dlg_code);
ok(dlg_code == (DLGC_WANTCHARS|DLGC_HASSETSEL|DLGC_WANTARROWS), "wrong dlg_code %08x\n", dlg_code);
ShowWindow(hwnd, SW_SHOW);
UpdateWindow(hwnd);
@ -7093,7 +7093,7 @@ static void test_edit_messages(void)
dlg_code = SendMessageA(hwnd, WM_GETDLGCODE, 0, 0);
ok(dlg_code == (DLGC_WANTCHARS|DLGC_HASSETSEL|DLGC_WANTARROWS|DLGC_WANTALLKEYS),
"wrong dlg_code %08lx\n", dlg_code);
"wrong dlg_code %08x\n", dlg_code);
ShowWindow(hwnd, SW_SHOW);
UpdateWindow(hwnd);
@ -7167,7 +7167,7 @@ static DWORD CALLBACK send_msg_thread_2(void *param)
break;
default:
trace("unexpected return: %04lx\n", ret);
trace("unexpected return: %04x\n", ret);
assert(0);
break;
}
@ -7213,7 +7213,7 @@ static void test_PeekMessage(void)
qs_all_input &= ~QS_RAWINPUT;
qs_input &= ~QS_RAWINPUT;
}
ok(qstatus == 0, "wrong qstatus %08lx\n", qstatus);
ok(qstatus == 0, "wrong qstatus %08x\n", qstatus);
trace("signalling to send message\n");
SetEvent(info.hevent[EV_SENDMSG]);
@ -7222,12 +7222,12 @@ static void test_PeekMessage(void)
/* pass invalid QS_xxxx flags */
SetLastError(0xdeadbeef);
qstatus = GetQueueStatus(0xffffffff);
ok(qstatus == 0, "GetQueueStatus should fail: %08lx\n", qstatus);
ok(GetLastError() == ERROR_INVALID_FLAGS, "wrong error %ld\n", GetLastError());
ok(qstatus == 0, "GetQueueStatus should fail: %08x\n", qstatus);
ok(GetLastError() == ERROR_INVALID_FLAGS, "wrong error %d\n", GetLastError());
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE);
@ -7237,23 +7237,23 @@ static void test_PeekMessage(void)
ok_sequence(WmUser, "WmUser", FALSE);
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == 0, "wrong qstatus %08lx\n", qstatus);
ok(qstatus == 0, "wrong qstatus %08x\n", qstatus);
keybd_event('N', 0, 0, 0);
keybd_event('N', 0, KEYEVENTF_KEYUP, 0);
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(QS_KEY, QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
PostMessageA(info.hwnd, WM_CHAR, 'z', 0);
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
InvalidateRect(info.hwnd, NULL, FALSE);
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(QS_PAINT, QS_PAINT|QS_POSTMESSAGE|QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
trace("signalling to send message\n");
SetEvent(info.hevent[EV_SENDMSG]);
@ -7261,7 +7261,7 @@ static void test_PeekMessage(void)
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE|QS_PAINT|QS_POSTMESSAGE|QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | (qs_input << 16));
@ -7275,7 +7275,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(0, QS_PAINT|QS_POSTMESSAGE|QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
}
trace("signalling to send message\n");
@ -7285,7 +7285,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE|QS_PAINT|QS_POSTMESSAGE|QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
}
msg.message = 0;
@ -7300,7 +7300,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(0, QS_PAINT|QS_POSTMESSAGE|QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
}
msg.message = 0;
@ -7315,7 +7315,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(0, QS_PAINT|QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
}
msg.message = 0;
@ -7330,7 +7330,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(0, QS_PAINT|QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
}
msg.message = 0;
@ -7343,7 +7343,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(0, QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
}
msg.message = 0;
@ -7356,7 +7356,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(0, QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
}
trace("signalling to send message\n");
@ -7366,7 +7366,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE|QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
}
PostMessageA(info.hwnd, WM_CHAR, 'z', 0);
@ -7374,7 +7374,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_SENDMESSAGE|QS_POSTMESSAGE|QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
}
msg.message = 0;
@ -7387,7 +7387,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(0, QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
}
msg.message = 0;
@ -7400,7 +7400,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(0, QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
}
PostMessageA(info.hwnd, WM_CHAR, 'z', 0);
@ -7408,7 +7408,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
}
trace("signalling to send message\n");
@ -7418,7 +7418,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE|QS_POSTMESSAGE|QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
}
msg.message = 0;
@ -7433,7 +7433,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(0, QS_POSTMESSAGE|QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
}
msg.message = 0;
@ -7448,7 +7448,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(0, QS_POSTMESSAGE|QS_KEY),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
}
msg.message = 0;
@ -7463,7 +7463,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(0, QS_POSTMESSAGE),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
}
msg.message = 0;
@ -7476,7 +7476,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(0, QS_POSTMESSAGE),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
}
msg.message = 0;
@ -7490,7 +7490,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == 0,
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE);
@ -7501,7 +7501,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == 0,
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
/* test whether presence of the quit flag in the queue affects
* the queue state
@ -7510,13 +7510,13 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
PostMessageA(info.hwnd, WM_USER, 0, 0);
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE);
@ -7526,7 +7526,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(0, QS_POSTMESSAGE),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE);
@ -7539,7 +7539,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(0, QS_POSTMESSAGE),
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
}
msg.message = 0;
@ -7551,7 +7551,7 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == 0,
"wrong qstatus %08lx\n", qstatus);
"wrong qstatus %08x\n", qstatus);
trace("signalling to exit\n");
SetEvent(info.hevent[EV_START_STOP]);
@ -7576,20 +7576,20 @@ static void test_quit_message(void)
PostQuitMessage(0xbeef);
ret = PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE);
ok(ret, "PeekMessage failed with error %ld\n", GetLastError());
ok(ret, "PeekMessage failed with error %d\n", GetLastError());
ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message);
ok(msg.wParam == 0xbeef, "wParam was 0x%x instead of 0xbeef\n", msg.wParam);
ret = PostThreadMessage(GetCurrentThreadId(), WM_USER, 0, 0);
ok(ret, "PostMessage failed with error %ld\n", GetLastError());
ok(ret, "PostMessage failed with error %d\n", GetLastError());
ret = GetMessage(&msg, NULL, 0, 0);
ok(ret > 0, "GetMessage failed with error %ld\n", GetLastError());
ok(ret > 0, "GetMessage failed with error %d\n", GetLastError());
ok(msg.message == WM_USER, "Received message 0x%04x instead of WM_USER\n", msg.message);
/* note: WM_QUIT message received after WM_USER message */
ret = GetMessage(&msg, NULL, 0, 0);
ok(!ret, "GetMessage return %d with error %ld instead of FALSE\n", ret, GetLastError());
ok(!ret, "GetMessage return %d with error %d instead of FALSE\n", ret, GetLastError());
ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message);
ok(msg.wParam == 0xbeef, "wParam was 0x%x instead of 0xbeef\n", msg.wParam);
@ -7600,21 +7600,21 @@ static void test_quit_message(void)
PostThreadMessage(GetCurrentThreadId(), WM_QUIT, 0xdead, 0);
ret = PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE);
ok(ret, "PeekMessage failed with error %ld\n", GetLastError());
ok(ret, "PeekMessage failed with error %d\n", GetLastError());
ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message);
ok(msg.wParam == 0xdead, "wParam was 0x%x instead of 0xdead\n", msg.wParam);
ret = PostThreadMessage(GetCurrentThreadId(), WM_USER, 0, 0);
ok(ret, "PostMessage failed with error %ld\n", GetLastError());
ok(ret, "PostMessage failed with error %d\n", GetLastError());
/* note: we receive the WM_QUIT message first this time */
ret = GetMessage(&msg, NULL, 0, 0);
ok(!ret, "GetMessage return %d with error %ld instead of FALSE\n", ret, GetLastError());
ok(!ret, "GetMessage return %d with error %d instead of FALSE\n", ret, GetLastError());
ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message);
ok(msg.wParam == 0xdead, "wParam was 0x%x instead of 0xdead\n", msg.wParam);
ret = GetMessage(&msg, NULL, 0, 0);
ok(ret > 0, "GetMessage failed with error %ld\n", GetLastError());
ok(ret > 0, "GetMessage failed with error %d\n", GetLastError());
ok(msg.message == WM_USER, "Received message 0x%04x instead of WM_USER\n", msg.message);
}
@ -7682,7 +7682,7 @@ static void test_TrackMouseEvent(void)
tme.dwHoverTime = track_hover_time; \
SetLastError(0xdeadbeef); \
ret = TrackMouseEvent(&tme); \
ok(ret, "TrackMouseEvent(TME_HOVER) error %ld\n", GetLastError())
ok(ret, "TrackMouseEvent(TME_HOVER) error %d\n", GetLastError())
#define track_query(expected_track_flags, expected_track_hwnd, expected_hover_time) \
tme.cbSize = sizeof(tme); \
@ -7691,14 +7691,14 @@ static void test_TrackMouseEvent(void)
tme.dwHoverTime = 0xdeadbeef; \
SetLastError(0xdeadbeef); \
ret = TrackMouseEvent(&tme); \
ok(ret, "TrackMouseEvent(TME_QUERY) error %ld\n", GetLastError());\
ok(tme.cbSize == sizeof(tme), "wrong tme.cbSize %lu\n", tme.cbSize); \
ok(ret, "TrackMouseEvent(TME_QUERY) error %d\n", GetLastError());\
ok(tme.cbSize == sizeof(tme), "wrong tme.cbSize %u\n", tme.cbSize); \
ok(tme.dwFlags == (expected_track_flags), \
"wrong tme.dwFlags %08lx, expected %08x\n", tme.dwFlags, (expected_track_flags)); \
"wrong tme.dwFlags %08x, expected %08x\n", tme.dwFlags, (expected_track_flags)); \
ok(tme.hwndTrack == (expected_track_hwnd), \
"wrong tme.hwndTrack %p, expected %p\n", tme.hwndTrack, (expected_track_hwnd)); \
ok(tme.dwHoverTime == (expected_hover_time), \
"wrong tme.dwHoverTime %lu, expected %u\n", tme.dwHoverTime, (expected_hover_time))
"wrong tme.dwHoverTime %u, expected %u\n", tme.dwHoverTime, (expected_hover_time))
#define track_hover_cancel(track_hwnd) \
tme.cbSize = sizeof(tme); \
@ -7707,7 +7707,7 @@ static void test_TrackMouseEvent(void)
tme.dwHoverTime = 0xdeadbeef; \
SetLastError(0xdeadbeef); \
ret = TrackMouseEvent(&tme); \
ok(ret, "TrackMouseEvent(TME_HOVER | TME_CANCEL) error %ld\n", GetLastError())
ok(ret, "TrackMouseEvent(TME_HOVER | TME_CANCEL) error %d\n", GetLastError())
default_hover_time = 0xdeadbeef;
ret = SystemParametersInfo(SPI_GETMOUSEHOVERTIME, 0, &default_hover_time, 0);
@ -7740,7 +7740,7 @@ static void test_TrackMouseEvent(void)
SetLastError(0xdeadbeef);
ret = TrackMouseEvent(&tme);
ok(!ret, "TrackMouseEvent should fail\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "not expected error %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "not expected error %d\n", GetLastError());
tme.cbSize = sizeof(tme);
tme.dwFlags = TME_HOVER;
@ -7749,7 +7749,7 @@ static void test_TrackMouseEvent(void)
SetLastError(0xdeadbeef);
ret = TrackMouseEvent(&tme);
ok(!ret, "TrackMouseEvent should fail\n");
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "not expected error %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "not expected error %d\n", GetLastError());
tme.cbSize = sizeof(tme);
tme.dwFlags = TME_HOVER | TME_CANCEL;
@ -7758,7 +7758,7 @@ static void test_TrackMouseEvent(void)
SetLastError(0xdeadbeef);
ret = TrackMouseEvent(&tme);
ok(!ret, "TrackMouseEvent should fail\n");
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "not expected error %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "not expected error %d\n", GetLastError());
GetWindowRect(hwnd, &rc_parent);
GetWindowRect(hchild, &rc_child);
@ -7859,7 +7859,7 @@ START_TEST(msg)
if (pUnhookWinEvent && hEvent_hook)
{
ret = pUnhookWinEvent(hEvent_hook);
ok( ret, "UnhookWinEvent error %ld\n", GetLastError());
ok( ret, "UnhookWinEvent error %d\n", GetLastError());
pUnhookWinEvent = 0;
}
hEvent_hook = 0;
@ -7888,11 +7888,11 @@ START_TEST(msg)
if (pUnhookWinEvent)
{
ret = pUnhookWinEvent(hEvent_hook);
ok( ret, "UnhookWinEvent error %ld\n", GetLastError());
ok( ret, "UnhookWinEvent error %d\n", GetLastError());
SetLastError(0xdeadbeef);
ok(!pUnhookWinEvent(hEvent_hook), "UnhookWinEvent succeeded\n");
ok(GetLastError() == ERROR_INVALID_HANDLE || /* Win2k */
GetLastError() == 0xdeadbeef, /* Win9x */
"unexpected error %ld\n", GetLastError());
"unexpected error %d\n", GetLastError());
}
}

View File

@ -64,18 +64,18 @@ static void test_LoadStringA (void)
}
ret = LoadStringA(hInst, 1, buf, sizeof(buf) );
ok( ret > 0, "LoadString failed: ret %d err %ld\n", ret, GetLastError());
ok( ret > 0, "LoadString failed: ret %d err %d\n", ret, GetLastError());
ok( LoadStringA( hInst, MAKELONG( 1, 0x8000 ), buf, sizeof(buf)) == ret,
"LoadString failed: ret %d err %ld\n", ret, GetLastError());
"LoadString failed: ret %d err %d\n", ret, GetLastError());
ok( LoadStringA( hInst, MAKELONG( 1, 0xffff ), buf, sizeof(buf)) == ret,
"LoadString failed: ret %d err %ld\n", ret, GetLastError());
"LoadString failed: ret %d err %d\n", ret, GetLastError());
ret = LoadStringA(hInst, 65534, buf, sizeof(buf) );
ok( ret > 0, "LoadString failed: ret %d err %ld\n", ret, GetLastError());
ok( ret > 0, "LoadString failed: ret %d err %d\n", ret, GetLastError());
ok( LoadStringA( hInst, MAKELONG( 65534, 0x8000 ), buf, sizeof(buf)) == ret,
"LoadString failed: ret %d err %ld\n", ret, GetLastError());
"LoadString failed: ret %d err %d\n", ret, GetLastError());
ok( LoadStringA( hInst, MAKELONG( 65534, 0xffff ), buf, sizeof(buf)) == ret,
"LoadString failed: ret %d err %ld\n", ret, GetLastError());
"LoadString failed: ret %d err %d\n", ret, GetLastError());
}
static void test_accel1(void)

View File

@ -216,14 +216,14 @@ static BOOL test_error_msg ( int rc, const char *name )
}
else
{
trace("%s failed for reason: %ld. Indicating test failure and skipping remainder of test\n",name,last_error);
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,last_error);
trace("%s failed for reason: %d. Indicating test failure and skipping remainder of test\n",name,last_error);
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,last_error);
}
return FALSE;
}
else
{
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,last_error);
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,last_error);
return TRUE;
}
}
@ -441,48 +441,48 @@ static void test_SPI_SETBEEP( void ) /* 2 */
curr_val = TRUE;
rc=SystemParametersInfoA( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
test_change_message( SPI_SETBEEP, 0 );
test_reg_key( SPI_SETBEEP_REGKEY,
SPI_SETBEEP_VALNAME,
curr_val ? "Yes" : "No" );
rc=SystemParametersInfoA( SPI_GETBEEP, 0, &b, 0 );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
eq( b, curr_val, "SPI_{GET,SET}BEEP", "%d" );
rc=SystemParametersInfoW( SPI_GETBEEP, 0, &b, 0 );
if (rc!=0 || GetLastError()!=ERROR_CALL_NOT_IMPLEMENTED)
{
ok(rc!=0,"SystemParametersInfoW: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoW: rc=%d err=%d\n",rc,GetLastError());
eq( b, curr_val, "SystemParametersInfoW", "%d" );
}
/* is a message sent for the second change? */
rc=SystemParametersInfoA( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
test_change_message( SPI_SETBEEP, 0 );
curr_val = FALSE;
rc=SystemParametersInfoW( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (rc==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
rc=SystemParametersInfoA( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"SystemParametersInfo: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfo: rc=%d err=%d\n",rc,GetLastError());
test_change_message( SPI_SETBEEP, 0 );
test_reg_key( SPI_SETBEEP_REGKEY,
SPI_SETBEEP_VALNAME,
curr_val ? "Yes" : "No" );
rc=SystemParametersInfoA( SPI_GETBEEP, 0, &b, 0 );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
eq( b, curr_val, "SPI_{GET,SET}BEEP", "%d" );
rc=SystemParametersInfoW( SPI_GETBEEP, 0, &b, 0 );
if (rc!=0 || GetLastError()!=ERROR_CALL_NOT_IMPLEMENTED)
{
ok(rc!=0,"SystemParametersInfoW: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoW: rc=%d err=%d\n",rc,GetLastError());
eq( b, curr_val, "SystemParametersInfoW", "%d" );
}
ok( MessageBeep( MB_OK ), "Return value of MessageBeep when sound is disabled\n" );
rc=SystemParametersInfoA( SPI_SETBEEP, old_b, 0, SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static const char *setmouse_valuenames[3] = {
@ -525,7 +525,7 @@ static void run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro
rc=SystemParametersInfoA( SPI_SETMOUSE, 0, curr_val, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
}
ok(rc!=0,"SystemParametersInfo: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfo: rc=%d err=%d\n",rc,GetLastError());
test_change_message( SPI_SETMOUSE, 0 );
for (i = 0; i < 3; i++)
{
@ -534,7 +534,7 @@ static void run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro
}
rc=SystemParametersInfoA( SPI_GETMOUSE, 0, mi, 0 );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
for (i = 0; i < 3; i++)
{
ok(mi[i] == curr_val[i],
@ -544,7 +544,7 @@ static void run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro
if (w_implemented)
{
rc=SystemParametersInfoW( SPI_GETMOUSE, 0, mi, 0 );
ok(rc!=0,"SystemParametersInfoW: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoW: rc=%d err=%d\n",rc,GetLastError());
for (i = 0; i < 3; i++)
{
ok(mi[i] == curr_val[i],
@ -626,7 +626,7 @@ static void test_SPI_SETMOUSE( void ) /* 4 */
run_spi_setmouse_test( curr_val, req_change, proj_change8, nchange );
rc=SystemParametersInfoA( SPI_SETMOUSE, 0, old_mi, SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_setborder(UINT curr_val, int usesetborder, int dpi)
@ -638,16 +638,16 @@ static void test_setborder(UINT curr_val, int usesetborder, int dpi)
ncm.cbSize = sizeof( ncm);
rc=SystemParametersInfo( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
if( usesetborder) {
rc=SystemParametersInfoA( SPI_SETBORDER, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
test_change_message( SPI_SETBORDER, 1 );
} else { /* set non client metrics */
ncm.iBorderWidth = curr_val;
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &ncm, SPIF_UPDATEINIFILE|
SPIF_SENDCHANGE);
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
test_change_message( SPI_SETNONCLIENTMETRICS, 1 );
}
if( curr_val) { /* skip if 0, some windows versions return 0 others 1 */
@ -660,11 +660,11 @@ static void test_setborder(UINT curr_val, int usesetborder, int dpi)
if (curr_val == 0) curr_val = 1;
/* should be the same as the non client metrics */
rc=SystemParametersInfo( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
eq( (UINT)ncm.iBorderWidth, curr_val, "NonClientMetric.iBorderWidth", "%d");
/* and from SPI_GETBORDER */
rc=SystemParametersInfoA( SPI_GETBORDER, 0, &border, 0 );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
eq( border, curr_val, "SPI_{GET,SET}BORDER", "%d");
/* test some SystemMetrics */
frame = curr_val + GetSystemMetrics( SM_CXDLGFRAME );
@ -683,7 +683,7 @@ static void test_SPI_SETBORDER( void ) /* 6 */
ncmsave.cbSize = sizeof( ncmsave);
rc=SystemParametersInfo( SPI_GETNONCLIENTMETRICS, 0, &ncmsave, 0);
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
/* CaptionWidth from the registry may have different value of iCaptionWidth
* from the non client metrics (observed on WinXP).
* Fix this so we can safely restore settings with the nonclientmetrics */
@ -723,7 +723,7 @@ static void test_SPI_SETBORDER( void ) /* 6 */
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &ncmsave,
SPIF_UPDATEINIFILE| SPIF_SENDCHANGE);
test_change_message( SPI_SETNONCLIENTMETRICS, 1 );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",
rc,GetLastError());
}
@ -747,18 +747,18 @@ static void test_SPI_SETKEYBOARDSPEED( void ) /* 10 */
rc=SystemParametersInfoA( SPI_SETKEYBOARDSPEED, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETKEYBOARDSPEED, 0 );
sprintf( buf, "%d", vals[i] );
test_reg_key( SPI_SETKEYBOARDSPEED_REGKEY, SPI_SETKEYBOARDSPEED_VALNAME, buf );
rc=SystemParametersInfoA( SPI_GETKEYBOARDSPEED, 0, &v, 0 );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
eq( v, vals[i], "SPI_{GET,SET}KEYBOARDSPEED", "%d" );
}
rc=SystemParametersInfoA( SPI_SETKEYBOARDSPEED, old_speed, 0, SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
/* test_SPI_ICONHORIZONTALSPACING helper */
@ -770,7 +770,7 @@ static void dotest_spi_iconhorizontalspacing( INT curr_val)
rc=SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, curr_val, 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
test_change_message( SPI_ICONHORIZONTALSPACING, 0 );
if( curr_val < 32) curr_val = 32;
/* The registry keys depend on the Windows version and the values too
@ -783,14 +783,14 @@ static void dotest_spi_iconhorizontalspacing( INT curr_val)
"wrong value in registry %d, expected %d\n", regval, curr_val);
/* compare with what SPI_ICONHORIZONTALSPACING returns */
rc=SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, 0, &spacing, 0 );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
eq( spacing, curr_val, "ICONHORIZONTALSPACING", "%d");
/* and with a system metrics */
eq( GetSystemMetrics( SM_CXICONSPACING ), curr_val, "SM_CXICONSPACING", "%d" );
/* and with what SPI_GETICONMETRICS returns */
im.cbSize = sizeof(ICONMETRICSA);
rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im, FALSE );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
eq( im.iHorzSpacing, curr_val, "SPI_GETICONMETRICS", "%d" );
}
@ -810,7 +810,7 @@ static void test_SPI_ICONHORIZONTALSPACING( void ) /* 13 */
dotest_spi_iconhorizontalspacing( 10); /* minimum is 32 */
/* restore */
rc=SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, old_spacing, 0, SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETSCREENSAVETIMEOUT( void ) /* 14 */
@ -833,20 +833,20 @@ static void test_SPI_SETSCREENSAVETIMEOUT( void ) /* 14 */
rc=SystemParametersInfoA( SPI_SETSCREENSAVETIMEOUT, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETSCREENSAVETIMEOUT, 0 );
sprintf( buf, "%d", vals[i] );
test_reg_key( SPI_SETSCREENSAVETIMEOUT_REGKEY,
SPI_SETSCREENSAVETIMEOUT_VALNAME, buf );
SystemParametersInfoA( SPI_GETSCREENSAVETIMEOUT, 0, &v, 0 );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
eq( v, vals[i], "SPI_{GET,SET}SCREENSAVETIMEOUT", "%d" );
}
rc=SystemParametersInfoA( SPI_SETSCREENSAVETIMEOUT, old_timeout, 0,
SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETSCREENSAVEACTIVE( void ) /* 17 */
@ -868,19 +868,19 @@ static void test_SPI_SETSCREENSAVEACTIVE( void ) /* 17 */
rc=SystemParametersInfoA( SPI_SETSCREENSAVEACTIVE, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETSCREENSAVEACTIVE, 0 );
test_reg_key( SPI_SETSCREENSAVEACTIVE_REGKEY,
SPI_SETSCREENSAVEACTIVE_VALNAME,
vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETSCREENSAVEACTIVE, 0, &v, 0 );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
eq( v, vals[i], "SPI_{GET,SET}SCREENSAVEACTIVE", "%d" );
}
rc=SystemParametersInfoA( SPI_SETSCREENSAVEACTIVE, old_b, 0, SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETGRIDGRANULARITY( void ) /* 19 */
@ -908,19 +908,19 @@ static void test_SPI_SETKEYBOARDDELAY( void ) /* 23 */
rc=SystemParametersInfoA( SPI_SETKEYBOARDDELAY, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETKEYBOARDDELAY, 0 );
sprintf( buf, "%d", vals[i] );
test_reg_key( SPI_SETKEYBOARDDELAY_REGKEY,
SPI_SETKEYBOARDDELAY_VALNAME, buf );
rc=SystemParametersInfoA( SPI_GETKEYBOARDDELAY, 0, &delay, 0 );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
eq( delay, vals[i], "SPI_{GET,SET}KEYBOARDDELAY", "%d" );
}
rc=SystemParametersInfoA( SPI_SETKEYBOARDDELAY, old_delay, 0, SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
@ -933,7 +933,7 @@ static void dotest_spi_iconverticalspacing( INT curr_val)
rc=SystemParametersInfoA( SPI_ICONVERTICALSPACING, curr_val, 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
test_change_message( SPI_ICONVERTICALSPACING, 0 );
if( curr_val < 32) curr_val = 32;
/* The registry keys depend on the Windows version and the values too
@ -946,14 +946,14 @@ static void dotest_spi_iconverticalspacing( INT curr_val)
"wrong value in registry %d, expected %d\n", regval, curr_val);
/* compare with what SPI_ICONVERTICALSPACING returns */
rc=SystemParametersInfoA( SPI_ICONVERTICALSPACING, 0, &spacing, 0 );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
eq( spacing, curr_val, "ICONVERTICALSPACING", "%d" );
/* and with a system metrics */
eq( GetSystemMetrics( SM_CYICONSPACING ), curr_val, "SM_CYICONSPACING", "%d" );
/* and with what SPI_GETICONMETRICS returns */
im.cbSize = sizeof(ICONMETRICSA);
rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im, FALSE );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
eq( im.iVertSpacing, curr_val, "SPI_GETICONMETRICS", "%d" );
}
@ -975,7 +975,7 @@ static void test_SPI_ICONVERTICALSPACING( void ) /* 24 */
/* restore */
rc=SystemParametersInfoA( SPI_ICONVERTICALSPACING, old_spacing, 0,
SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",
rc,GetLastError());
}
@ -1007,7 +1007,7 @@ static void test_SPI_SETICONTITLEWRAP( void ) /* 26 */
rc=SystemParametersInfoA( SPI_SETICONTITLEWRAP, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETICONTITLEWRAP, 1 );
regval = metricfromreg( SPI_SETICONTITLEWRAP_REGKEY2,
SPI_SETICONTITLEWRAP_VALNAME, dpi);
@ -1018,17 +1018,17 @@ static void test_SPI_SETICONTITLEWRAP( void ) /* 26 */
"wrong value in registry %d, expected %d\n", regval, vals[i] );
rc=SystemParametersInfoA( SPI_GETICONTITLEWRAP, 0, &v, 0 );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
eq( v, vals[i], "SPI_{GET,SET}ICONTITLEWRAP", "%d" );
/* and test with what SPI_GETICONMETRICS returns */
im.cbSize = sizeof(ICONMETRICSA);
rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im, FALSE );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
eq( im.iTitleWrap, (BOOL)vals[i], "SPI_GETICONMETRICS", "%d" );
}
rc=SystemParametersInfoA( SPI_SETICONTITLEWRAP, old_b, 0, SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */
@ -1050,7 +1050,7 @@ static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */
rc=SystemParametersInfoA( SPI_SETMENUDROPALIGNMENT, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETMENUDROPALIGNMENT, 0 );
test_reg_key_ex( SPI_SETMENUDROPALIGNMENT_REGKEY1,
SPI_SETMENUDROPALIGNMENT_REGKEY2,
@ -1058,7 +1058,7 @@ static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */
vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETMENUDROPALIGNMENT, 0, &v, 0 );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
eq( v, vals[i], "SPI_{GET,SET}MENUDROPALIGNMENT", "%d" );
eq( GetSystemMetrics( SM_MENUDROPALIGNMENT ), (int)vals[i],
"SM_MENUDROPALIGNMENT", "%d" );
@ -1066,7 +1066,7 @@ static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */
rc=SystemParametersInfoA( SPI_SETMENUDROPALIGNMENT, old_b, 0,
SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETDOUBLECLKWIDTH( void ) /* 29 */
@ -1100,7 +1100,7 @@ static void test_SPI_SETDOUBLECLKWIDTH( void ) /* 29 */
rc=SystemParametersInfoA( SPI_SETDOUBLECLKWIDTH, old_width, 0,
SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETDOUBLECLKHEIGHT( void ) /* 30 */
@ -1134,7 +1134,7 @@ static void test_SPI_SETDOUBLECLKHEIGHT( void ) /* 30 */
rc=SystemParametersInfoA( SPI_SETDOUBLECLKHEIGHT, old_height, 0,
SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETDOUBLECLICKTIME( void ) /* 32 */
@ -1165,7 +1165,7 @@ static void test_SPI_SETDOUBLECLICKTIME( void ) /* 32 */
curr_val = 1000;
rc=SystemParametersInfoA( SPI_SETDOUBLECLICKTIME, curr_val, 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
test_change_message( SPI_SETDOUBLECLICKTIME, 0 );
sprintf( buf, "%d", curr_val );
test_reg_key( SPI_SETDOUBLECLICKTIME_REGKEY,
@ -1190,7 +1190,7 @@ static void test_SPI_SETDOUBLECLICKTIME( void ) /* 32 */
eq( GetDoubleClickTime(), curr_val, "GetDoubleClickTime", "%d" );
rc=SystemParametersInfoA(SPI_SETDOUBLECLICKTIME, old_time, 0, SPIF_UPDATEINIFILE);
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETMOUSEBUTTONSWAP( void ) /* 33 */
@ -1225,7 +1225,7 @@ static void test_SPI_SETMOUSEBUTTONSWAP( void ) /* 33 */
rc=SystemParametersInfoA( SPI_SETMOUSEBUTTONSWAP, old_b, 0,
SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETFASTTASKSWITCH( void ) /* 36 */
@ -1265,19 +1265,19 @@ static void test_SPI_SETDRAGFULLWINDOWS( void ) /* 37 */
rc=SystemParametersInfoA( SPI_SETDRAGFULLWINDOWS, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETDRAGFULLWINDOWS, 0 );
test_reg_key( SPI_SETDRAGFULLWINDOWS_REGKEY,
SPI_SETDRAGFULLWINDOWS_VALNAME,
vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETDRAGFULLWINDOWS, 0, &v, 0 );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
eq( v, vals[i], "SPI_{GET,SET}DRAGFULLWINDOWS", "%d" );
}
rc=SystemParametersInfoA( SPI_SETDRAGFULLWINDOWS, old_b, 0, SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
#define test_reg_metric( KEY, VAL, val) \
@ -1301,7 +1301,7 @@ static void test_SPI_SETDRAGFULLWINDOWS( void ) /* 37 */
(LF).lfWidth == lfreg.lfWidth &&\
(LF).lfWeight == lfreg.lfWeight &&\
!strcmp( (LF).lfFaceName, lfreg.lfFaceName)\
, "wrong value \"%s\" in registry %ld, %ld\n", VAL, (LF).lfHeight, lfreg.lfHeight);\
, "wrong value \"%s\" in registry %d, %d\n", VAL, (LF).lfHeight, lfreg.lfHeight);\
}
#define TEST_NONCLIENTMETRICS_REG( ncm) \
@ -1392,11 +1392,11 @@ static void test_SPI_SETNONCLIENTMETRICS( void ) /* 44 */
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &Ncmnew, SPIF_UPDATEINIFILE|
SPIF_SENDCHANGE);
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
test_change_message( SPI_SETNONCLIENTMETRICS, 1 );
/* get them back */
rc=SystemParametersInfoA( SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &Ncmcur, FALSE );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
/* test registry entries */
TEST_NONCLIENTMETRICS_REG( Ncmcur)
/* test the systemm metrics with these settings */
@ -1415,13 +1415,13 @@ static void test_SPI_SETNONCLIENTMETRICS( void ) /* 44 */
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &Ncmnew, SPIF_UPDATEINIFILE|
SPIF_SENDCHANGE);
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
test_change_message( SPI_SETNONCLIENTMETRICS, 1 );
/* raw values are in registry */
TEST_NONCLIENTMETRICS_REG( Ncmnew)
/* get them back */
rc=SystemParametersInfoA( SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &Ncmcur, FALSE );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
/* cooked values are returned */
expect = max( Ncmnew.iMenuHeight, 2 + get_tmheight( &Ncmnew.lfMenuFont, 1));
ok( Ncmcur.iMenuHeight == expect,
@ -1446,7 +1446,7 @@ static void test_SPI_SETNONCLIENTMETRICS( void ) /* 44 */
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS),
&Ncmorig, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
test_change_message( SPI_SETNONCLIENTMETRICS, 0 );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETMINIMIZEDMETRICS( void ) /* 44 */
@ -1488,10 +1488,10 @@ static void test_SPI_SETMINIMIZEDMETRICS( void ) /* 44 */
lpMm_cur.iArrange = 5;
rc=SystemParametersInfoA( SPI_SETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS),
&lpMm_cur, SPIF_UPDATEINIFILE );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
/* read them back */
rc=SystemParametersInfoA( SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), &lpMm_new, FALSE );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
/* and compare */
eq( lpMm_new.iWidth, lpMm_cur.iWidth, "iWidth", "%d" );
eq( lpMm_new.iHorzGap, lpMm_cur.iHorzGap, "iHorzGap", "%d" );
@ -1526,10 +1526,10 @@ static void test_SPI_SETMINIMIZEDMETRICS( void ) /* 44 */
lpMm_cur.iArrange = - 1;
rc=SystemParametersInfoA( SPI_SETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS),
&lpMm_cur, SPIF_UPDATEINIFILE );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
/* read back */
rc=SystemParametersInfoA( SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), &lpMm_new, FALSE );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
/* the width and H/V gaps have minimum 0, arrange is and'd with 0xf */
eq( lpMm_new.iWidth, 0, "iWidth", "%d" );
eq( lpMm_new.iHorzGap, 0, "iHorzGap", "%d" );
@ -1562,10 +1562,10 @@ static void test_SPI_SETMINIMIZEDMETRICS( void ) /* 44 */
/* restore */
rc=SystemParametersInfoA( SPI_SETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS),
&lpMm_orig, SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
/* check that */
rc=SystemParametersInfoA( SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), &lpMm_new, FALSE );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
eq( lpMm_new.iWidth, lpMm_orig.iWidth, "iWidth", "%d" );
eq( lpMm_new.iHorzGap, lpMm_orig.iHorzGap, "iHorzGap", "%d" );
eq( lpMm_new.iVertGap, lpMm_orig.iVertGap, "iVertGap", "%d" );
@ -1626,18 +1626,18 @@ static void test_SPI_SETICONMETRICS( void ) /* 46 */
strcpy( im_cur.lfFont.lfFaceName, "MS Sans Serif");
rc=SystemParametersInfoA( SPI_SETICONMETRICS, sizeof(ICONMETRICSA), &im_cur, SPIF_UPDATEINIFILE );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im_new, FALSE );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
/* test GET <-> SETICONMETRICS */
eq( im_new.iHorzSpacing, im_cur.iHorzSpacing, "iHorzSpacing", "%d" );
eq( im_new.iVertSpacing, im_cur.iVertSpacing, "iVertSpacing", "%d" );
eq( im_new.iTitleWrap, im_cur.iTitleWrap, "iTitleWrap", "%d" );
eq( im_new.lfFont.lfHeight, im_cur.lfFont.lfHeight, "lfHeight", "%ld" );
eq( im_new.lfFont.lfWidth, im_cur.lfFont.lfWidth, "lfWidth", "%ld" );
eq( im_new.lfFont.lfEscapement, im_cur.lfFont.lfEscapement, "lfEscapement", "%ld" );
eq( im_new.lfFont.lfWeight, im_cur.lfFont.lfWeight, "lfWeight", "%ld" );
eq( im_new.lfFont.lfHeight, im_cur.lfFont.lfHeight, "lfHeight", "%d" );
eq( im_new.lfFont.lfWidth, im_cur.lfFont.lfWidth, "lfWidth", "%d" );
eq( im_new.lfFont.lfEscapement, im_cur.lfFont.lfEscapement, "lfEscapement", "%d" );
eq( im_new.lfFont.lfWeight, im_cur.lfFont.lfWeight, "lfWeight", "%d" );
eq( im_new.lfFont.lfItalic, im_cur.lfFont.lfItalic, "lfItalic", "%d" );
eq( im_new.lfFont.lfStrikeOut, im_cur.lfFont.lfStrikeOut, "lfStrikeOut", "%d" );
eq( im_new.lfFont.lfUnderline, im_cur.lfFont.lfUnderline, "lfUnderline", "%d" );
@ -1678,10 +1678,10 @@ static void test_SPI_SETICONMETRICS( void ) /* 46 */
wrap, im_cur.iTitleWrap);
/* restore old values */
rc=SystemParametersInfoA( SPI_SETICONMETRICS, sizeof(ICONMETRICSA), &im_orig,SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im_new, FALSE );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
eq( im_new.iHorzSpacing, im_orig.iHorzSpacing, "iHorzSpacing", "%d" );
eq( im_new.iVertSpacing, im_orig.iVertSpacing, "iVertSpacing", "%d" );
@ -1713,25 +1713,25 @@ static void test_SPI_SETWORKAREA( void ) /* 47 */
curr_val.bottom = old_area.bottom-1;
rc=SystemParametersInfoA( SPI_SETWORKAREA, 0, &curr_val,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
test_change_message( SPI_SETWORKAREA, 0 );
rc=SystemParametersInfoA( SPI_GETWORKAREA, 0, &area, 0 );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
eq( area.left, curr_val.left, "left", "%ld" );
eq( area.top, curr_val.top, "top", "%ld" );
eq( area.right, curr_val.right, "right", "%ld" );
eq( area.bottom, curr_val.bottom, "bottom", "%ld" );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
eq( area.left, curr_val.left, "left", "%d" );
eq( area.top, curr_val.top, "top", "%d" );
eq( area.right, curr_val.right, "right", "%d" );
eq( area.bottom, curr_val.bottom, "bottom", "%d" );
rc=SystemParametersInfoA( SPI_SETWORKAREA, 0, &old_area,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
test_change_message( SPI_SETWORKAREA, 0 );
rc=SystemParametersInfoA( SPI_GETWORKAREA, 0, &area, 0 );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
eq( area.left, old_area.left, "left", "%ld" );
eq( area.top, old_area.top, "top", "%ld" );
eq( area.right, old_area.right, "right", "%ld" );
eq( area.bottom, old_area.bottom, "bottom", "%ld" );
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
eq( area.left, old_area.left, "left", "%d" );
eq( area.top, old_area.top, "top", "%d" );
eq( area.right, old_area.right, "right", "%d" );
eq( area.bottom, old_area.bottom, "bottom", "%d" );
}
static void test_SPI_SETSHOWSOUNDS( void ) /* 57 */
@ -1754,21 +1754,21 @@ static void test_SPI_SETSHOWSOUNDS( void ) /* 57 */
rc=SystemParametersInfoA( SPI_SETSHOWSOUNDS, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETSHOWSOUNDS, 0 );
test_reg_key( SPI_SETSHOWSOUNDS_REGKEY,
SPI_SETSHOWSOUNDS_VALNAME,
vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETSHOWSOUNDS, 0, &v, 0 );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
eq( v, vals[i], "SPI_GETSHOWSOUNDS", "%d" );
eq( GetSystemMetrics( SM_SHOWSOUNDS ), (int)vals[i],
"SM_SHOWSOUNDS", "%d" );
}
rc=SystemParametersInfoA( SPI_SETSHOWSOUNDS, old_b, 0, SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETKEYBOARDPREF( void ) /* 69 */
@ -1790,19 +1790,19 @@ static void test_SPI_SETKEYBOARDPREF( void ) /* 69 */
rc=SystemParametersInfoA( SPI_SETKEYBOARDPREF, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETKEYBOARDPREF, 0 );
test_reg_key_ex2( SPI_SETKEYBOARDPREF_REGKEY, SPI_SETKEYBOARDPREF_REGKEY_LEGACY,
SPI_SETKEYBOARDPREF_VALNAME, SPI_SETKEYBOARDPREF_VALNAME_LEGACY,
vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETKEYBOARDPREF, 0, &v, 0 );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
eq( v, (BOOL)vals[i], "SPI_GETKEYBOARDPREF", "%d" );
}
rc=SystemParametersInfoA( SPI_SETKEYBOARDPREF, old_b, 0, SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETSCREENREADER( void ) /* 71 */
@ -1824,19 +1824,19 @@ static void test_SPI_SETSCREENREADER( void ) /* 71 */
rc=SystemParametersInfoA( SPI_SETSCREENREADER, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETSCREENREADER, 0 );
test_reg_key_ex2( SPI_SETSCREENREADER_REGKEY, SPI_SETSCREENREADER_REGKEY_LEGACY,
SPI_SETSCREENREADER_VALNAME, SPI_SETSCREENREADER_VALNAME_LEGACY,
vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETSCREENREADER, 0, &v, 0 );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
eq( v, (BOOL)vals[i], "SPI_GETSCREENREADER", "%d" );
}
rc=SystemParametersInfoA( SPI_SETSCREENREADER, old_b, 0, SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETFONTSMOOTHING( void ) /* 75 */
@ -1859,19 +1859,19 @@ static void test_SPI_SETFONTSMOOTHING( void ) /* 75 */
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHING, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETFONTSMOOTHING, 0 );
test_reg_key( SPI_SETFONTSMOOTHING_REGKEY,
SPI_SETFONTSMOOTHING_VALNAME,
vals[i] ? "2" : "0" );
rc=SystemParametersInfoA( SPI_GETFONTSMOOTHING, 0, &v, 0 );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
eq( v, vals[i] ? 1 : 0, "SPI_GETFONTSMOOTHING", "%d" );
}
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHING, old_b, 0, SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETLOWPOWERACTIVE( void ) /* 85 */
@ -1893,19 +1893,19 @@ static void test_SPI_SETLOWPOWERACTIVE( void ) /* 85 */
rc=SystemParametersInfoA( SPI_SETLOWPOWERACTIVE, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETLOWPOWERACTIVE, 0 );
test_reg_key( SPI_SETLOWPOWERACTIVE_REGKEY,
SPI_SETLOWPOWERACTIVE_VALNAME,
vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETLOWPOWERACTIVE, 0, &v, 0 );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
eq( v, vals[i], "SPI_GETLOWPOWERACTIVE", "%d" );
}
rc=SystemParametersInfoA( SPI_SETLOWPOWERACTIVE, old_b, 0, SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETPOWEROFFACTIVE( void ) /* 86 */
@ -1927,19 +1927,19 @@ static void test_SPI_SETPOWEROFFACTIVE( void ) /* 86 */
rc=SystemParametersInfoA( SPI_SETPOWEROFFACTIVE, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETPOWEROFFACTIVE, 0 );
test_reg_key( SPI_SETPOWEROFFACTIVE_REGKEY,
SPI_SETPOWEROFFACTIVE_VALNAME,
vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETPOWEROFFACTIVE, 0, &v, 0 );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
eq( v, vals[i], "SPI_GETPOWEROFFACTIVE", "%d" );
}
rc=SystemParametersInfoA( SPI_SETPOWEROFFACTIVE, old_b, 0, SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETMOUSEHOVERWIDTH( void ) /* 99 */
@ -1965,20 +1965,20 @@ static void test_SPI_SETMOUSEHOVERWIDTH( void ) /* 99 */
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERWIDTH, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETMOUSEHOVERWIDTH, 0 );
sprintf( buf, "%d", vals[i] );
test_reg_key( SPI_SETMOUSEHOVERWIDTH_REGKEY,
SPI_SETMOUSEHOVERWIDTH_VALNAME, buf );
SystemParametersInfoA( SPI_GETMOUSEHOVERWIDTH, 0, &v, 0 );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
eq( v, vals[i], "SPI_{GET,SET}MOUSEHOVERWIDTH", "%d" );
}
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERWIDTH, old_width, 0,
SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETMOUSEHOVERHEIGHT( void ) /* 101 */
@ -2004,20 +2004,20 @@ static void test_SPI_SETMOUSEHOVERHEIGHT( void ) /* 101 */
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERHEIGHT, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETMOUSEHOVERHEIGHT, 0 );
sprintf( buf, "%d", vals[i] );
test_reg_key( SPI_SETMOUSEHOVERHEIGHT_REGKEY,
SPI_SETMOUSEHOVERHEIGHT_VALNAME, buf );
SystemParametersInfoA( SPI_GETMOUSEHOVERHEIGHT, 0, &v, 0 );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
eq( v, vals[i], "SPI_{GET,SET}MOUSEHOVERHEIGHT", "%d" );
}
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERHEIGHT, old_height, 0,
SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETMOUSEHOVERTIME( void ) /* 103 */
@ -2047,20 +2047,20 @@ static void test_SPI_SETMOUSEHOVERTIME( void ) /* 103 */
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERTIME, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETMOUSEHOVERTIME, 0 );
sprintf( buf, "%d", vals[i] );
test_reg_key( SPI_SETMOUSEHOVERTIME_REGKEY,
SPI_SETMOUSEHOVERTIME_VALNAME, buf );
SystemParametersInfoA( SPI_GETMOUSEHOVERTIME, 0, &v, 0 );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
eq( v, vals[i], "SPI_{GET,SET}MOUSEHOVERTIME", "%d" );
}
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERTIME, old_time, 0,
SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETWHEELSCROLLLINES( void ) /* 105 */
@ -2085,20 +2085,20 @@ static void test_SPI_SETWHEELSCROLLLINES( void ) /* 105 */
rc=SystemParametersInfoA( SPI_SETWHEELSCROLLLINES, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETWHEELSCROLLLINES, 0 );
sprintf( buf, "%d", vals[i] );
test_reg_key( SPI_SETMOUSESCROLLLINES_REGKEY,
SPI_SETMOUSESCROLLLINES_VALNAME, buf );
SystemParametersInfoA( SPI_GETWHEELSCROLLLINES, 0, &v, 0 );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
eq( v, vals[i], "SPI_{GET,SET}WHEELSCROLLLINES", "%d" );
}
rc=SystemParametersInfoA( SPI_SETWHEELSCROLLLINES, old_lines, 0,
SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETMENUSHOWDELAY( void ) /* 107 */
@ -2123,20 +2123,20 @@ static void test_SPI_SETMENUSHOWDELAY( void ) /* 107 */
rc=SystemParametersInfoA( SPI_SETMENUSHOWDELAY, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETMENUSHOWDELAY, 0 );
sprintf( buf, "%d", vals[i] );
test_reg_key( SPI_SETMENUSHOWDELAY_REGKEY,
SPI_SETMENUSHOWDELAY_VALNAME, buf );
SystemParametersInfoA( SPI_GETMENUSHOWDELAY, 0, &v, 0 );
ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
eq( v, vals[i], "SPI_{GET,SET}MENUSHOWDELAY", "%d" );
}
rc=SystemParametersInfoA( SPI_SETMENUSHOWDELAY, old_delay, 0,
SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
}
static void test_SPI_SETWALLPAPER( void ) /* 115 */
@ -2156,11 +2156,11 @@ static void test_SPI_SETWALLPAPER( void ) /* 115 */
strcpy(newval, "");
rc=SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, newval, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
test_change_message(SPI_SETDESKWALLPAPER, 0);
rc=SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, oldval, SPIF_UPDATEINIFILE);
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError());
test_reg_key(SPI_SETDESKWALLPAPER_REGKEY, SPI_SETDESKWALLPAPER_VALNAME, oldval);
}
@ -2425,7 +2425,7 @@ void test_GetSystemMetrics( void)
ncm.iBorderWidth, ncm.iCaptionWidth, ncm.iCaptionHeight, IconSpacing, IconVerticalSpacing);
trace( "MenuHeight %d MenuWidth %d ScrollHeight %d ScrollWidth %d SmCaptionHeight %d SmCaptionWidth %d\n",
ncm.iMenuHeight, ncm.iMenuWidth, ncm.iScrollHeight, ncm.iScrollWidth, ncm.iSmCaptionHeight, ncm.iSmCaptionWidth);
trace( "Captionfontchar width %d MenuFont %ld,%ld CaptionWidth from registry: %d\n",
trace( "Captionfontchar width %d MenuFont %d,%d CaptionWidth from registry: %d\n",
avcwCaption, tmMenuFont.tmHeight, tmMenuFont.tmExternalLeading, CaptionWidth);
}
ReleaseDC( 0, hdc);

View File

@ -46,9 +46,9 @@ static void test_DrawTextCalcRect(void)
/* Initialization */
hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP,
0, 0, 200, 200, 0, 0, 0, NULL);
ok(hwnd != 0, "CreateWindowExA error %lu\n", GetLastError());
ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError());
hdc = GetDC(hwnd);
ok(hdc != 0, "GetDC error %lu\n", GetLastError());
ok(hdc != 0, "GetDC error %u\n", GetLastError());
trace("hdc %p\n", hdc);
textlen = lstrlenA(text);
@ -65,23 +65,23 @@ static void test_DrawTextCalcRect(void)
SetMapMode(hdc, MM_HIENGLISH);
lf.lfHeight = 100 * 9 / 72; /* 9 point */
hFont = CreateFontIndirectA(&lf);
ok(hFont != 0, "CreateFontIndirectA error %lu\n",
ok(hFont != 0, "CreateFontIndirectA error %u\n",
GetLastError());
hOldFont = SelectObject(hdc, hFont);
textheight = DrawTextA(hdc, text, textlen, &rect, DT_CALCRECT |
DT_EXTERNALLEADING | DT_WORDBREAK | DT_NOCLIP | DT_LEFT |
DT_NOPREFIX);
ok( textheight, "DrawTextA error %lu\n", GetLastError());
ok( textheight, "DrawTextA error %u\n", GetLastError());
trace("MM_HIENGLISH rect.bottom %ld\n", rect.bottom);
trace("MM_HIENGLISH rect.bottom %d\n", rect.bottom);
todo_wine ok(rect.bottom < 0, "In MM_HIENGLISH, DrawText with "
"DT_CALCRECT should return a negative rectangle bottom. "
"(bot=%ld)\n", rect.bottom);
"(bot=%d)\n", rect.bottom);
SelectObject(hdc, hOldFont);
ret = DeleteObject(hFont);
ok( ret, "DeleteObject error %lu\n", GetLastError());
ok( ret, "DeleteObject error %u\n", GetLastError());
/* DrawText in MM_TEXT with DT_CALCRECT */
@ -89,18 +89,18 @@ static void test_DrawTextCalcRect(void)
lf.lfHeight = -MulDiv(9, GetDeviceCaps(hdc,
LOGPIXELSY), 72); /* 9 point */
hFont = CreateFontIndirectA(&lf);
ok(hFont != 0, "CreateFontIndirectA error %lu\n",
ok(hFont != 0, "CreateFontIndirectA error %u\n",
GetLastError());
hOldFont = SelectObject(hdc, hFont);
textheight = DrawTextA(hdc, text, textlen, &rect, DT_CALCRECT |
DT_EXTERNALLEADING | DT_WORDBREAK | DT_NOCLIP | DT_LEFT |
DT_NOPREFIX);
ok( textheight, "DrawTextA error %lu\n", GetLastError());
ok( textheight, "DrawTextA error %u\n", GetLastError());
trace("MM_TEXT rect.bottom %ld\n", rect.bottom);
trace("MM_TEXT rect.bottom %d\n", rect.bottom);
ok(rect.bottom > 0, "In MM_TEXT, DrawText with DT_CALCRECT "
"should return a positive rectangle bottom. (bot=%ld)\n",
"should return a positive rectangle bottom. (bot=%d)\n",
rect.bottom);
/* empty or null text should in some cases calc an empty rectangle */
@ -148,13 +148,13 @@ static void test_DrawTextCalcRect(void)
SelectObject(hdc, hOldFont);
ret = DeleteObject(hFont);
ok( ret, "DeleteObject error %lu\n", GetLastError());
ok( ret, "DeleteObject error %u\n", GetLastError());
/* Clean up */
ret = ReleaseDC(hwnd, hdc);
ok( ret, "ReleaseDC error %lu\n", GetLastError());
ok( ret, "ReleaseDC error %u\n", GetLastError());
ret = DestroyWindow(hwnd);
ok( ret, "DestroyWindow error %lu\n", GetLastError());
ok( ret, "DestroyWindow error %u\n", GetLastError());
}
/* replace tabs by \t */
@ -194,12 +194,12 @@ static void test_TabbedText(void)
/* Initialization */
hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP,
0, 0, 200, 200, 0, 0, 0, NULL);
ok(hwnd != 0, "CreateWindowExA error %lu\n", GetLastError());
ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError());
hdc = GetDC(hwnd);
ok(hdc != 0, "GetDC error %lu\n", GetLastError());
ok(hdc != 0, "GetDC error %u\n", GetLastError());
ret = GetTextMetricsA( hdc, &tm);
ok( ret, "GetTextMetrics error %lu\n", GetLastError());
ok( ret, "GetTextMetrics error %u\n", GetLastError());
extent = GetTabbedTextExtentA( hdc, "x", 1, 1, tabs);
cx = LOWORD( extent);

View File

@ -548,8 +548,8 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
MINMAXINFO* minmax = (MINMAXINFO *)lparam;
trace("hwnd %p, WM_GETMINMAXINFO, %08x, %08lx\n", hwnd, wparam, lparam);
trace("ptReserved (%ld,%ld), ptMaxSize (%ld,%ld), ptMaxPosition (%ld,%ld)\n"
" ptMinTrackSize (%ld,%ld), ptMaxTrackSize (%ld,%ld)\n",
trace("ptReserved (%d,%d), ptMaxSize (%d,%d), ptMaxPosition (%d,%d)\n"
" ptMinTrackSize (%d,%d), ptMaxTrackSize (%d,%d)\n",
minmax->ptReserved.x, minmax->ptReserved.y,
minmax->ptMaxSize.x, minmax->ptMaxSize.y,
minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
@ -594,11 +594,11 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
ok(winpos->cy >= 0 && winpos->cy <= 32767, "bad winpos->cy %d\n", winpos->cy);
GetWindowRect(hwnd, &rc1);
trace("window: (%ld,%ld)-(%ld,%ld)\n", rc1.left, rc1.top, rc1.right, rc1.bottom);
trace("window: (%d,%d)-(%d,%d)\n", rc1.left, rc1.top, rc1.right, rc1.bottom);
SetRect(&rc2, winpos->x, winpos->y, winpos->x + winpos->cx, winpos->y + winpos->cy);
/* note: winpos coordinates are relative to parent */
MapWindowPoints(GetParent(hwnd), 0, (LPPOINT)&rc2, 2);
trace("pos: (%ld,%ld)-(%ld,%ld)\n", rc2.left, rc2.top, rc2.right, rc2.bottom);
trace("pos: (%d,%d)-(%d,%d)\n", rc2.left, rc2.top, rc2.right, rc2.bottom);
#if 0 /* Uncomment this once the test succeeds in all cases */
ok(EqualRect(&rc1, &rc2), "rects do not match\n");
#endif
@ -606,7 +606,7 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
GetClientRect(hwnd, &rc2);
DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc1);
MapWindowPoints(0, hwnd, (LPPOINT)&rc1, 2);
ok(EqualRect(&rc1, &rc2), "rects do not match (%ld,%ld-%ld,%ld) / (%ld,%ld-%ld,%ld)\n",
ok(EqualRect(&rc1, &rc2), "rects do not match (%d,%d-%d,%d) / (%d,%d-%d,%d)\n",
rc1.left, rc1.top, rc1.right, rc1.bottom, rc2.left, rc2.top, rc2.right, rc2.bottom );
break;
}
@ -615,7 +615,7 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
BOOL got_getminmaxinfo = GetWindowLongPtrA(hwnd, GWLP_USERDATA) == 0x20031021;
CREATESTRUCTA *cs = (CREATESTRUCTA *)lparam;
trace("WM_NCCREATE: hwnd %p, parent %p, style %08lx\n", hwnd, cs->hwndParent, cs->style);
trace("WM_NCCREATE: hwnd %p, parent %p, style %08x\n", hwnd, cs->hwndParent, cs->style);
if (got_getminmaxinfo)
trace("%p got WM_GETMINMAXINFO\n", hwnd);
@ -643,8 +643,8 @@ static LRESULT WINAPI tool_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
MINMAXINFO* minmax = (MINMAXINFO *)lparam;
trace("hwnd %p, WM_GETMINMAXINFO, %08x, %08lx\n", hwnd, wparam, lparam);
trace("ptReserved (%ld,%ld), ptMaxSize (%ld,%ld), ptMaxPosition (%ld,%ld)\n"
" ptMinTrackSize (%ld,%ld), ptMaxTrackSize (%ld,%ld)\n",
trace("ptReserved (%d,%d), ptMaxSize (%d,%d), ptMaxPosition (%d,%d)\n"
" ptMinTrackSize (%d,%d), ptMaxTrackSize (%d,%d)\n",
minmax->ptReserved.x, minmax->ptReserved.y,
minmax->ptMaxSize.x, minmax->ptMaxSize.y,
minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
@ -658,7 +658,7 @@ static LRESULT WINAPI tool_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
BOOL got_getminmaxinfo = GetWindowLongPtrA(hwnd, GWLP_USERDATA) == 0x20031021;
CREATESTRUCTA *cs = (CREATESTRUCTA *)lparam;
trace("WM_NCCREATE: hwnd %p, parent %p, style %08lx\n", hwnd, cs->hwndParent, cs->style);
trace("WM_NCCREATE: hwnd %p, parent %p, style %08x\n", hwnd, cs->hwndParent, cs->style);
if (got_getminmaxinfo)
trace("%p got WM_GETMINMAXINFO\n", hwnd);
@ -723,20 +723,20 @@ static void verify_window_info(HWND hwnd, const WINDOWINFO *info, BOOL test_bord
ok(EqualRect(&rcClient, &info->rcClient), "wrong rcClient\n");
ok(info->dwStyle == (DWORD)GetWindowLongA(hwnd, GWL_STYLE),
"wrong dwStyle: %08lx != %08lx\n", info->dwStyle, GetWindowLongA(hwnd, GWL_STYLE));
"wrong dwStyle: %08x != %08x\n", info->dwStyle, GetWindowLongA(hwnd, GWL_STYLE));
ok(info->dwExStyle == (DWORD)GetWindowLongA(hwnd, GWL_EXSTYLE),
"wrong dwExStyle: %08lx != %08lx\n", info->dwExStyle, GetWindowLongA(hwnd, GWL_EXSTYLE));
"wrong dwExStyle: %08x != %08x\n", info->dwExStyle, GetWindowLongA(hwnd, GWL_EXSTYLE));
status = (GetActiveWindow() == hwnd) ? WS_ACTIVECAPTION : 0;
ok(info->dwWindowStatus == status, "wrong dwWindowStatus: %04lx != %04lx\n",
ok(info->dwWindowStatus == status, "wrong dwWindowStatus: %04x != %04x\n",
info->dwWindowStatus, status);
if (test_borders && !IsRectEmpty(&rcWindow))
{
trace("rcWindow: %ld,%ld - %ld,%ld\n", rcWindow.left, rcWindow.top, rcWindow.right, rcWindow.bottom);
trace("rcClient: %ld,%ld - %ld,%ld\n", rcClient.left, rcClient.top, rcClient.right, rcClient.bottom);
trace("rcWindow: %d,%d - %d,%d\n", rcWindow.left, rcWindow.top, rcWindow.right, rcWindow.bottom);
trace("rcClient: %d,%d - %d,%d\n", rcClient.left, rcClient.top, rcClient.right, rcClient.bottom);
ok(info->cxWindowBorders == (unsigned)(rcClient.left - rcWindow.left),
"wrong cxWindowBorders %d != %ld\n", info->cxWindowBorders, rcClient.left - rcWindow.left);
"wrong cxWindowBorders %d != %d\n", info->cxWindowBorders, rcClient.left - rcWindow.left);
border = min(rcWindow.bottom - rcClient.bottom, rcClient.top - rcWindow.top);
ok(info->cyWindowBorders == border,
"wrong cyWindowBorders %d != %d\n", info->cyWindowBorders, border);
@ -773,9 +773,9 @@ static void test_nonclient_area(HWND hwnd)
menu = !(style & WS_CHILD) && GetMenu(hwnd) != 0;
GetWindowRect(hwnd, &rc_window);
trace("window: (%ld,%ld)-(%ld,%ld)\n", rc_window.left, rc_window.top, rc_window.right, rc_window.bottom);
trace("window: (%d,%d)-(%d,%d)\n", rc_window.left, rc_window.top, rc_window.right, rc_window.bottom);
GetClientRect(hwnd, &rc_client);
trace("client: (%ld,%ld)-(%ld,%ld)\n", rc_client.left, rc_client.top, rc_client.right, rc_client.bottom);
trace("client: (%d,%d)-(%d,%d)\n", rc_client.left, rc_client.top, rc_client.right, rc_client.bottom);
/* avoid some cases when things go wrong */
if (IsRectEmpty(&rc_window) || IsRectEmpty(&rc_client) ||
@ -785,15 +785,15 @@ static void test_nonclient_area(HWND hwnd)
MapWindowPoints(hwnd, 0, (LPPOINT)&rc, 2);
FixedAdjustWindowRectEx(&rc, style, menu, exstyle);
trace("calc window: (%ld,%ld)-(%ld,%ld)\n", rc.left, rc.top, rc.right, rc.bottom);
ok(EqualRect(&rc, &rc_window), "window rect does not match: style:exstyle=0x%08lx:0x%08lx, menu=%d\n", style, exstyle, menu);
trace("calc window: (%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom);
ok(EqualRect(&rc, &rc_window), "window rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d\n", style, exstyle, menu);
CopyRect(&rc, &rc_window);
DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2);
trace("calc client: (%ld,%ld)-(%ld,%ld)\n", rc.left, rc.top, rc.right, rc.bottom);
ok(EqualRect(&rc, &rc_client), "client rect does not match: style:exstyle=0x%08lx:0x%08lx, menu=%d\n", style, exstyle, menu);
trace("calc client: (%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom);
ok(EqualRect(&rc, &rc_client), "client rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d\n", style, exstyle, menu);
/* Win9x doesn't like WM_NCCALCSIZE with synthetic data and crashes */;
if (is_win9x)
@ -804,14 +804,14 @@ static void test_nonclient_area(HWND hwnd)
CopyRect(&rc_window, &rc_client);
MapWindowPoints(hwnd, 0, (LPPOINT)&rc_window, 2);
FixedAdjustWindowRectEx(&rc_window, style, menu, exstyle);
trace("calc window: (%ld,%ld)-(%ld,%ld)\n",
trace("calc window: (%d,%d)-(%d,%d)\n",
rc_window.left, rc_window.top, rc_window.right, rc_window.bottom);
CopyRect(&rc, &rc_window);
DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2);
trace("calc client: (%ld,%ld)-(%ld,%ld)\n", rc.left, rc.top, rc.right, rc.bottom);
ok(EqualRect(&rc, &rc_client), "synthetic rect does not match: style:exstyle=0x%08lx:0x%08lx, menu=%d\n", style, exstyle, menu);
trace("calc client: (%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom);
ok(EqualRect(&rc, &rc_client), "synthetic rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d\n", style, exstyle, menu);
}
static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
@ -861,14 +861,14 @@ static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
#endif
LONG style;
CBT_CREATEWNDA *createwnd = (CBT_CREATEWNDA *)lParam;
trace("HCBT_CREATEWND: hwnd %p, parent %p, style %08lx\n",
trace("HCBT_CREATEWND: hwnd %p, parent %p, style %08x\n",
(HWND)wParam, createwnd->lpcs->hwndParent, createwnd->lpcs->style);
ok(createwnd->hwndInsertAfter == HWND_TOP, "hwndInsertAfter should be always HWND_TOP\n");
/* WS_VISIBLE should be turned off yet */
style = createwnd->lpcs->style & ~WS_VISIBLE;
ok(style == GetWindowLongA((HWND)wParam, GWL_STYLE),
"style of hwnd and style in the CREATESTRUCT do not match: %08lx != %08lx\n",
"style of hwnd and style in the CREATESTRUCT do not match: %08x != %08x\n",
GetWindowLongA((HWND)wParam, GWL_STYLE), style);
#if 0 /* Uncomment this once the test succeeds in all cases */
@ -959,7 +959,7 @@ static void test_shell_window(void)
GetWindowThreadProcessId(shellWindow, &pid);
hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
ret = TerminateProcess(hProcess, 0);
ok(ret, "termination of previous shell process failed: GetLastError()=%ld\n", GetLastError());
ok(ret, "termination of previous shell process failed: GetLastError()=%d\n", GetLastError());
WaitForSingleObject(hProcess, INFINITE); /* wait for termination */
CloseHandle(hProcess);
}
@ -1069,14 +1069,14 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
mdi_cs.lParam = (LPARAM)mdi_lParam_test_message;
mdi_child = (HWND)SendMessageA(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs);
ok(mdi_child != 0, "MDI child creation failed\n");
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
mdi_cs.style = 0x7fffffff; /* without WS_POPUP */
mdi_child = (HWND)SendMessageA(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs);
ok(mdi_child != 0, "MDI child creation failed\n");
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
@ -1089,7 +1089,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
else
{
ok(mdi_child != 0, "MDI child creation failed\n");
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
}
@ -1110,7 +1110,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
}
else
{
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
}
@ -1122,7 +1122,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
mdi_client, GetModuleHandle(0),
(LPARAM)mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
@ -1133,7 +1133,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
mdi_client, GetModuleHandle(0),
(LPARAM)mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
@ -1150,7 +1150,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
else
{
ok(mdi_child != 0, "MDI child creation failed\n");
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
}
@ -1172,7 +1172,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
}
else
{
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
}
@ -1184,7 +1184,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
mdi_client, 0, GetModuleHandle(0),
(LPVOID)mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
@ -1195,7 +1195,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
mdi_client, 0, GetModuleHandle(0),
(LPVOID)mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
@ -1212,7 +1212,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
else
{
ok(mdi_child != 0, "MDI child creation failed\n");
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
}
@ -1234,7 +1234,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
}
else
{
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
}
@ -1258,7 +1258,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
mdi_client, 0, GetModuleHandle(0),
(LPVOID)mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
DestroyWindow(mdi_child);
mdi_child = CreateWindowExA(0, "MDI_child_Class_2", "MDI child",
@ -1268,7 +1268,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
mdi_client, 0, GetModuleHandle(0),
(LPVOID)mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
DestroyWindow(mdi_child);
/* maximized child */
@ -1279,7 +1279,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
mdi_client, 0, GetModuleHandle(0),
(LPVOID)mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
DestroyWindow(mdi_child);
trace("Creating maximized child with a caption\n");
@ -1290,7 +1290,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
mdi_client, 0, GetModuleHandle(0),
(LPVOID)mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
DestroyWindow(mdi_child);
trace("Creating maximized child with a caption and a thick frame\n");
@ -1301,7 +1301,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
mdi_client, 0, GetModuleHandle(0),
(LPVOID)mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
DestroyWindow(mdi_child);
}
@ -1327,7 +1327,7 @@ static void MDI_ChildGetMinMaxInfo( HWND client, HWND hwnd, MINMAXINFO* lpMinMax
lpMinMax->ptMaxPosition.x = rect.left;
lpMinMax->ptMaxPosition.y = rect.top;
trace("max rect (%ld,%ld - %ld, %ld)\n",
trace("max rect (%d,%d - %d, %d)\n",
rect.left, rect.top, rect.right, rect.bottom);
}
@ -1352,7 +1352,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, L
/* MDICREATESTRUCT should have original values */
ok(mdi_cs->style == 0 || mdi_cs->style == 0x7fffffff || mdi_cs->style == 0xffffffff,
"mdi_cs->style does not match (%08lx)\n", mdi_cs->style);
"mdi_cs->style does not match (%08x)\n", mdi_cs->style);
ok(mdi_cs->x == CW_USEDEFAULT, "%d != CW_USEDEFAULT\n", mdi_cs->x);
ok(mdi_cs->y == CW_USEDEFAULT, "%d != CW_USEDEFAULT\n", mdi_cs->y);
ok(mdi_cs->cx == CW_USEDEFAULT, "%d != CW_USEDEFAULT\n", mdi_cs->cx);
@ -1372,7 +1372,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, L
{
LONG style = mdi_cs->style | WS_CHILD | WS_CLIPSIBLINGS;
ok(cs->style == style,
"cs->style does not match (%08lx)\n", cs->style);
"cs->style does not match (%08x)\n", cs->style);
}
else
{
@ -1381,7 +1381,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, L
style |= WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION |
WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX;
ok(cs->style == style,
"cs->style does not match (%08lx)\n", cs->style);
"cs->style does not match (%08x)\n", cs->style);
}
break;
}
@ -1398,9 +1398,9 @@ static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, L
exstyle = GetWindowLongA(hwnd, GWL_EXSTYLE);
GetWindowRect(client, &rc);
trace("MDI client %p window size = (%ld x %ld)\n", client, rc.right-rc.left, rc.bottom-rc.top);
trace("MDI client %p window size = (%d x %d)\n", client, rc.right-rc.left, rc.bottom-rc.top);
GetClientRect(client, &rc);
trace("MDI client %p client size = (%ld x %ld)\n", client, rc.right, rc.bottom);
trace("MDI client %p client size = (%d x %d)\n", client, rc.right, rc.bottom);
trace("screen size: %d x %d\n", GetSystemMetrics(SM_CXSCREEN),
GetSystemMetrics(SM_CYSCREEN));
@ -1408,32 +1408,32 @@ static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, L
if ((style & WS_CAPTION) == WS_CAPTION)
style &= ~WS_BORDER; /* WS_CAPTION = WS_DLGFRAME | WS_BORDER */
AdjustWindowRectEx(&rc, style, 0, exstyle);
trace("MDI child: calculated max window size = (%ld x %ld)\n", rc.right-rc.left, rc.bottom-rc.top);
trace("MDI child: calculated max window size = (%d x %d)\n", rc.right-rc.left, rc.bottom-rc.top);
trace("ptReserved = (%ld,%ld)\n"
"ptMaxSize = (%ld,%ld)\n"
"ptMaxPosition = (%ld,%ld)\n"
"ptMinTrackSize = (%ld,%ld)\n"
"ptMaxTrackSize = (%ld,%ld)\n",
trace("ptReserved = (%d,%d)\n"
"ptMaxSize = (%d,%d)\n"
"ptMaxPosition = (%d,%d)\n"
"ptMinTrackSize = (%d,%d)\n"
"ptMaxTrackSize = (%d,%d)\n",
minmax->ptReserved.x, minmax->ptReserved.y,
minmax->ptMaxSize.x, minmax->ptMaxSize.y,
minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
minmax->ptMinTrackSize.x, minmax->ptMinTrackSize.y,
minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y);
ok(minmax->ptMaxSize.x == rc.right - rc.left, "default width of maximized child %ld != %ld\n",
ok(minmax->ptMaxSize.x == rc.right - rc.left, "default width of maximized child %d != %d\n",
minmax->ptMaxSize.x, rc.right - rc.left);
ok(minmax->ptMaxSize.y == rc.bottom - rc.top, "default height of maximized child %ld != %ld\n",
ok(minmax->ptMaxSize.y == rc.bottom - rc.top, "default height of maximized child %d != %d\n",
minmax->ptMaxSize.y, rc.bottom - rc.top);
DefMDIChildProcA(hwnd, msg, wparam, lparam);
trace("DefMDIChildProc returned:\n"
"ptReserved = (%ld,%ld)\n"
"ptMaxSize = (%ld,%ld)\n"
"ptMaxPosition = (%ld,%ld)\n"
"ptMinTrackSize = (%ld,%ld)\n"
"ptMaxTrackSize = (%ld,%ld)\n",
"ptReserved = (%d,%d)\n"
"ptMaxSize = (%d,%d)\n"
"ptMaxPosition = (%d,%d)\n"
"ptMinTrackSize = (%d,%d)\n"
"ptMaxTrackSize = (%d,%d)\n",
minmax->ptReserved.x, minmax->ptReserved.y,
minmax->ptMaxSize.x, minmax->ptMaxSize.y,
minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
@ -1441,9 +1441,9 @@ static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, L
minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y);
MDI_ChildGetMinMaxInfo(client, hwnd, &my_minmax);
ok(minmax->ptMaxSize.x == my_minmax.ptMaxSize.x, "default width of maximized child %ld != %ld\n",
ok(minmax->ptMaxSize.x == my_minmax.ptMaxSize.x, "default width of maximized child %d != %d\n",
minmax->ptMaxSize.x, my_minmax.ptMaxSize.x);
ok(minmax->ptMaxSize.y == my_minmax.ptMaxSize.y, "default height of maximized child %ld != %ld\n",
ok(minmax->ptMaxSize.y == my_minmax.ptMaxSize.y, "default height of maximized child %d != %d\n",
minmax->ptMaxSize.y, my_minmax.ptMaxSize.y);
return 1;
@ -1509,28 +1509,28 @@ static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, L
exstyle = GetWindowLongA(hwnd, GWL_EXSTYLE);
GetClientRect(parent, &rc);
trace("parent %p client size = (%ld x %ld)\n", parent, rc.right, rc.bottom);
trace("parent %p client size = (%d x %d)\n", parent, rc.right, rc.bottom);
GetClientRect(parent, &rc);
if ((style & WS_CAPTION) == WS_CAPTION)
style &= ~WS_BORDER; /* WS_CAPTION = WS_DLGFRAME | WS_BORDER */
AdjustWindowRectEx(&rc, style, 0, exstyle);
trace("calculated max child window size = (%ld x %ld)\n", rc.right-rc.left, rc.bottom-rc.top);
trace("calculated max child window size = (%d x %d)\n", rc.right-rc.left, rc.bottom-rc.top);
trace("ptReserved = (%ld,%ld)\n"
"ptMaxSize = (%ld,%ld)\n"
"ptMaxPosition = (%ld,%ld)\n"
"ptMinTrackSize = (%ld,%ld)\n"
"ptMaxTrackSize = (%ld,%ld)\n",
trace("ptReserved = (%d,%d)\n"
"ptMaxSize = (%d,%d)\n"
"ptMaxPosition = (%d,%d)\n"
"ptMinTrackSize = (%d,%d)\n"
"ptMaxTrackSize = (%d,%d)\n",
minmax->ptReserved.x, minmax->ptReserved.y,
minmax->ptMaxSize.x, minmax->ptMaxSize.y,
minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
minmax->ptMinTrackSize.x, minmax->ptMinTrackSize.y,
minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y);
ok(minmax->ptMaxSize.x == rc.right - rc.left, "default width of maximized child %ld != %ld\n",
ok(minmax->ptMaxSize.x == rc.right - rc.left, "default width of maximized child %d != %d\n",
minmax->ptMaxSize.x, rc.right - rc.left);
ok(minmax->ptMaxSize.y == rc.bottom - rc.top, "default height of maximized child %ld != %ld\n",
ok(minmax->ptMaxSize.y == rc.bottom - rc.top, "default height of maximized child %d != %d\n",
minmax->ptMaxSize.y, rc.bottom - rc.top);
break;
}
@ -1541,11 +1541,11 @@ static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, L
RECT rc1, rc2;
GetWindowRect(hwnd, &rc1);
trace("window: (%ld,%ld)-(%ld,%ld)\n", rc1.left, rc1.top, rc1.right, rc1.bottom);
trace("window: (%d,%d)-(%d,%d)\n", rc1.left, rc1.top, rc1.right, rc1.bottom);
SetRect(&rc2, winpos->x, winpos->y, winpos->x + winpos->cx, winpos->y + winpos->cy);
/* note: winpos coordinates are relative to parent */
MapWindowPoints(GetParent(hwnd), 0, (LPPOINT)&rc2, 2);
trace("pos: (%ld,%ld)-(%ld,%ld)\n", rc2.left, rc2.top, rc2.right, rc2.bottom);
trace("pos: (%d,%d)-(%d,%d)\n", rc2.left, rc2.top, rc2.right, rc2.bottom);
ok(EqualRect(&rc1, &rc2), "rects do not match\n");
GetWindowRect(hwnd, &rc1);
@ -1628,11 +1628,11 @@ static LRESULT WINAPI mdi_main_wnd_procA(HWND hwnd, UINT msg, WPARAM wparam, LPA
RECT rc1, rc2;
GetWindowRect(hwnd, &rc1);
trace("window: (%ld,%ld)-(%ld,%ld)\n", rc1.left, rc1.top, rc1.right, rc1.bottom);
trace("window: (%d,%d)-(%d,%d)\n", rc1.left, rc1.top, rc1.right, rc1.bottom);
SetRect(&rc2, winpos->x, winpos->y, winpos->x + winpos->cx, winpos->y + winpos->cy);
/* note: winpos coordinates are relative to parent */
MapWindowPoints(GetParent(hwnd), 0, (LPPOINT)&rc2, 2);
trace("pos: (%ld,%ld)-(%ld,%ld)\n", rc2.left, rc2.top, rc2.right, rc2.bottom);
trace("pos: (%d,%d)-(%d,%d)\n", rc2.left, rc2.top, rc2.right, rc2.bottom);
ok(EqualRect(&rc1, &rc2), "rects do not match\n");
GetWindowRect(hwnd, &rc1);
@ -1808,12 +1808,12 @@ static void test_SetWindowPos(HWND hwnd)
SetRect(&rect, 111, 222, 333, 444);
ok(!GetWindowRect(0, &rect), "GetWindowRect succeeded\n");
ok(rect.left == 111 && rect.top == 222 && rect.right == 333 && rect.bottom == 444,
"wrong window rect %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"wrong window rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
SetRect(&rect, 111, 222, 333, 444);
ok(!GetClientRect(0, &rect), "GetClientRect succeeded\n");
ok(rect.left == 111 && rect.top == 222 && rect.right == 333 && rect.bottom == 444,
"wrong window rect %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"wrong window rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
GetWindowRect(hwnd, &orig_win_rc);
@ -1821,20 +1821,20 @@ static void test_SetWindowPos(HWND hwnd)
SetWindowPos(hwnd, 0, 100, 100, 0, 0, SWP_NOZORDER|SWP_FRAMECHANGED);
GetWindowRect( hwnd, &rect );
ok( rect.left == 100 && rect.top == 100 && rect.right == 100 && rect.bottom == 100,
"invalid window rect %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid window rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
GetClientRect( hwnd, &rect );
MapWindowPoints( hwnd, 0, (POINT *)&rect, 2 );
ok( rect.left == 90 && rect.top == 90 && rect.right == 110 && rect.bottom == 110,
"invalid client rect %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid client rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
SetWindowPos(hwnd, 0, 200, 200, 0, 0, SWP_NOZORDER|SWP_FRAMECHANGED);
GetWindowRect( hwnd, &rect );
ok( rect.left == 200 && rect.top == 200 && rect.right == 200 && rect.bottom == 200,
"invalid window rect %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid window rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
GetClientRect( hwnd, &rect );
MapWindowPoints( hwnd, 0, (POINT *)&rect, 2 );
ok( rect.left == 210 && rect.top == 210 && rect.right == 190 && rect.bottom == 190,
"invalid client rect %ld,%ld-%ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom );
"invalid client rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
SetWindowPos(hwnd, 0, orig_win_rc.left, orig_win_rc.top,
orig_win_rc.right, orig_win_rc.bottom, 0);
@ -1874,7 +1874,7 @@ static void test_SetMenu(HWND parent)
ok(ret == hMenu, "unexpected menu id %p\n", ret);
/* test whether we can destroy a menu assigned to a window */
retok = DestroyMenu(hMenu);
ok( retok, "DestroyMenu error %ld\n", GetLastError());
ok( retok, "DestroyMenu error %d\n", GetLastError());
ok(!IsMenu(hMenu), "menu handle should be not valid after DestroyMenu\n");
ret = GetMenu(parent);
/* This test fails on Win9x */
@ -2038,15 +2038,15 @@ static void test_vis_rgn( HWND hwnd )
trace("win9x, mapping to screen coords\n");
MapWindowPoints( hwnd, 0, (POINT *)&rgn_rect, 2 );
}
trace("win: %ld,%ld-%ld,%ld\n", win_rect.left, win_rect.top, win_rect.right, win_rect.bottom );
trace("rgn: %ld,%ld-%ld,%ld\n", rgn_rect.left, rgn_rect.top, rgn_rect.right, rgn_rect.bottom );
ok( win_rect.left <= rgn_rect.left, "rgn left %ld not inside win rect %ld\n",
trace("win: %d,%d-%d,%d\n", win_rect.left, win_rect.top, win_rect.right, win_rect.bottom );
trace("rgn: %d,%d-%d,%d\n", rgn_rect.left, rgn_rect.top, rgn_rect.right, rgn_rect.bottom );
ok( win_rect.left <= rgn_rect.left, "rgn left %d not inside win rect %d\n",
rgn_rect.left, win_rect.left );
ok( win_rect.top <= rgn_rect.top, "rgn top %ld not inside win rect %ld\n",
ok( win_rect.top <= rgn_rect.top, "rgn top %d not inside win rect %d\n",
rgn_rect.top, win_rect.top );
ok( win_rect.right >= rgn_rect.right, "rgn right %ld not inside win rect %ld\n",
ok( win_rect.right >= rgn_rect.right, "rgn right %d not inside win rect %d\n",
rgn_rect.right, win_rect.right );
ok( win_rect.bottom >= rgn_rect.bottom, "rgn bottom %ld not inside win rect %ld\n",
ok( win_rect.bottom >= rgn_rect.bottom, "rgn bottom %d not inside win rect %d\n",
rgn_rect.bottom, win_rect.bottom );
ReleaseDC( hwnd, hdc );
}
@ -2192,7 +2192,7 @@ static void test_SetForegroundWindow(HWND hwnd)
SetLastError(0xdeadbeef);
ret = SetForegroundWindow(0);
ok(!ret, "SetForegroundWindow returned TRUE instead of FALSE\n");
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got error %ld expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got error %d expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError());
check_wnd_state(hwnd, hwnd, hwnd, 0);
SetWindowPos(hwnd,0,0,0,0,0,SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_HIDEWINDOW);
@ -2471,7 +2471,7 @@ static void test_mouse_input(HWND hwnd)
UpdateWindow(hwnd);
GetWindowRect(hwnd, &rc);
trace("main window %p: (%ld,%ld)-(%ld,%ld)\n", hwnd, rc.left, rc.top, rc.right, rc.bottom);
trace("main window %p: (%d,%d)-(%d,%d)\n", hwnd, rc.left, rc.top, rc.right, rc.bottom);
popup = CreateWindowExA(0, "MainWindowClass", NULL, WS_POPUP,
rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top,
@ -2481,7 +2481,7 @@ static void test_mouse_input(HWND hwnd)
UpdateWindow(popup);
GetWindowRect(popup, &rc);
trace("popup window %p: (%ld,%ld)-(%ld,%ld)\n", popup, rc.left, rc.top, rc.right, rc.bottom);
trace("popup window %p: (%d,%d)-(%d,%d)\n", popup, rc.left, rc.top, rc.right, rc.bottom);
x = rc.left + (rc.right - rc.left) / 2;
y = rc.top + (rc.bottom - rc.top) / 2;
@ -2489,7 +2489,7 @@ static void test_mouse_input(HWND hwnd)
SetCursorPos(x, y);
GetCursorPos(&pt);
ok(x == pt.x && y == pt.y, "wrong cursor pos (%ld,%ld), expected (%d,%d)\n", pt.x, pt.y, x, y);
ok(x == pt.x && y == pt.y, "wrong cursor pos (%d,%d), expected (%d,%d)\n", pt.x, pt.y, x, y);
/* force the system to update its internal queue mouse position,
* otherwise it won't generate relative mouse movements below.
@ -2632,7 +2632,7 @@ static void test_validatergn(HWND hwnd)
ValidateRect( hwnd, &rc);
ret = GetUpdateRect( child, &rc2, 0);
ok( rc2.left == 0 && rc2.top == 0 && rc2.right == 0 && rc2.bottom == 0,
"Update rectangle %ld,%ld-%ld,%ld is not empty!\n", rc2.left, rc2.top,
"Update rectangle %d,%d-%d,%d is not empty!\n", rc2.left, rc2.top,
rc2.right, rc2.bottom);
/* now test ValidateRgn */
@ -2643,7 +2643,7 @@ static void test_validatergn(HWND hwnd)
ValidateRgn( hwnd, rgn);
ret = GetUpdateRect( child, &rc2, 0);
ok( rc2.left == 0 && rc2.top == 0 && rc2.right == 0 && rc2.bottom == 0,
"Update rectangle %ld,%ld-%ld,%ld is not empty!\n", rc2.left, rc2.top,
"Update rectangle %d,%d-%d,%d is not empty!\n", rc2.left, rc2.top,
rc2.right, rc2.bottom);
DeleteObject( rgn);
@ -2654,10 +2654,10 @@ static void nccalchelper(HWND hwnd, INT x, INT y, RECT *prc)
{
MoveWindow( hwnd, 0, 0, x, y, 0);
GetWindowRect( hwnd, prc);
trace("window rect is %ld,%ld - %ld,%ld\n",
trace("window rect is %d,%d - %d,%d\n",
prc->left,prc->top,prc->right,prc->bottom);
DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)prc);
trace("nccalc rect is %ld,%ld - %ld,%ld\n",
trace("nccalc rect is %d,%d - %d,%d\n",
prc->left,prc->top,prc->right,prc->bottom);
}
@ -2674,29 +2674,29 @@ static void test_nccalcscroll(HWND parent)
/* test window too low for a horizontal scroll bar */
nccalchelper( hwnd, 100, sbheight, &rc1);
ok( rc1.bottom - rc1.top == sbheight, "Height should be %d size is %ld,%ld - %ld,%ld\n",
ok( rc1.bottom - rc1.top == sbheight, "Height should be %d size is %d,%d - %d,%d\n",
sbheight, rc1.left, rc1.top, rc1.right, rc1.bottom);
/* test window just high enough for a horizontal scroll bar */
nccalchelper( hwnd, 100, sbheight + 1, &rc1);
ok( rc1.bottom - rc1.top == 1, "Height should be %d size is %ld,%ld - %ld,%ld\n",
ok( rc1.bottom - rc1.top == 1, "Height should be %d size is %d,%d - %d,%d\n",
1, rc1.left, rc1.top, rc1.right, rc1.bottom);
/* test window too narrow for a vertical scroll bar */
nccalchelper( hwnd, sbwidth - 1, 100, &rc1);
ok( rc1.right - rc1.left == sbwidth - 1 , "Width should be %d size is %ld,%ld - %ld,%ld\n",
ok( rc1.right - rc1.left == sbwidth - 1 , "Width should be %d size is %d,%d - %d,%d\n",
sbwidth - 1, rc1.left, rc1.top, rc1.right, rc1.bottom);
/* test window just wide enough for a vertical scroll bar */
nccalchelper( hwnd, sbwidth, 100, &rc1);
ok( rc1.right - rc1.left == 0, "Width should be %d size is %ld,%ld - %ld,%ld\n",
ok( rc1.right - rc1.left == 0, "Width should be %d size is %d,%d - %d,%d\n",
0, rc1.left, rc1.top, rc1.right, rc1.bottom);
/* same test, but with client edge: not enough width */
SetWindowLong( hwnd, GWL_EXSTYLE, WS_EX_CLIENTEDGE | GetWindowLong( hwnd, GWL_EXSTYLE));
nccalchelper( hwnd, sbwidth, 100, &rc1);
ok( rc1.right - rc1.left == sbwidth - 2 * GetSystemMetrics(SM_CXEDGE),
"Width should be %d size is %ld,%ld - %ld,%ld\n",
"Width should be %d size is %d,%d - %d,%d\n",
sbwidth - 2 * GetSystemMetrics(SM_CXEDGE), rc1.left, rc1.top, rc1.right, rc1.bottom);
DestroyWindow( hwnd);
@ -2783,7 +2783,7 @@ todo_wine {
ok(GetMenu(sibling) == hMenu, "SetParent should not remove menu\n");
ret = DestroyWindow(parent);
ok( ret, "DestroyWindow() error %ld\n", GetLastError());
ok( ret, "DestroyWindow() error %d\n", GetLastError());
ok(!IsWindow(parent), "parent still exists\n");
ok(!IsWindow(sibling), "sibling still exists\n");
@ -2818,7 +2818,7 @@ static LRESULT WINAPI StyleCheckProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM
(lpss->styleOld & ~WS_EX_WINDOWEDGE), (lpcs->dwExStyle & ~WS_EX_WINDOWEDGE));
ok(lpss->styleNew == lpcs->style,
"Style (0x%08lx) should match what the caller passed to CreateWindowEx (0x%08lx)\n",
"Style (0x%08x) should match what the caller passed to CreateWindowEx (0x%08x)\n",
lpss->styleNew, lpcs->style);
}
break;
@ -2878,7 +2878,7 @@ static void check_window_style(DWORD dwStyleIn, DWORD dwExStyleIn, DWORD dwStyle
dwActualStyle = GetWindowLong(hwnd, GWL_STYLE);
dwActualExStyle = GetWindowLong(hwnd, GWL_EXSTYLE);
ok((dwActualStyle == dwStyleOut) && (dwActualExStyle == dwExStyleOut),
"Style (0x%08lx) should really be 0x%08lx and/or Ex style (0x%08lx) should really be 0x%08lx\n",
"Style (0x%08x) should really be 0x%08x and/or Ex style (0x%08x) should really be 0x%08x\n",
dwActualStyle, dwStyleOut, dwActualExStyle, dwExStyleOut);
DestroyWindow(hwnd);
@ -2940,7 +2940,7 @@ static void test_scrollvalidate( HWND parent)
SetRectRgn( tmprgn, 0,93,98,98);
CombineRgn( exprgn, exprgn, tmprgn, RGN_OR);
ok( EqualRgn( exprgn, hrgn), "wrong update region\n");
trace("update rect is %ld,%ld - %ld,%ld\n",
trace("update rect is %d,%d - %d,%d\n",
rcu.left,rcu.top,rcu.right,rcu.bottom);
/* now with clipping region */
SelectClipRgn( hdc, clipping);
@ -2953,7 +2953,7 @@ static void test_scrollvalidate( HWND parent)
SetRectRgn( tmprgn, 10,85,90,90);
CombineRgn( exprgn, exprgn, tmprgn, RGN_OR);
ok( EqualRgn( exprgn, hrgn), "wrong update region\n");
trace("update rect is %ld,%ld - %ld,%ld\n",
trace("update rect is %d,%d - %d,%d\n",
rcu.left,rcu.top,rcu.right,rcu.bottom);
ReleaseDC( hwnd1, hdc);
@ -3099,19 +3099,19 @@ static void test_scrolldc( HWND parent)
cliprc.top = (rc.top + rc.bottom) /2;
/* test whether scrolled pixels are properly clipped */
colr = GetPixel( hdc, (rc.left+rc.right)/2, ( rc.top + rc.bottom) /2 - 1);
ok ( colr == 0, "pixel should be black, color is %08lx\n", colr);
ok ( colr == 0, "pixel should be black, color is %08x\n", colr);
/* this scroll should not cause any visible changes */
ScrollDC( hdc, 5, -20, &rc, &cliprc, hrgn, &rcu);
colr = GetPixel( hdc, (rc.left+rc.right)/2, ( rc.top + rc.bottom) /2 - 1);
ok ( colr == 0, "pixel should be black, color is %08lx\n", colr);
ok ( colr == 0, "pixel should be black, color is %08x\n", colr);
/* test with NULL clip rect */
ScrollDC( hdc, 20, -20, &rc, NULL, hrgn, &rcu);
/*FillRgn(hdc, hrgn, GetStockObject(WHITE_BRUSH));*/
trace("update rect: %ld,%ld - %ld,%ld\n",
trace("update rect: %d,%d - %d,%d\n",
rcu.left, rcu.top, rcu.right, rcu.bottom);
if (winetest_debug > 0) dump_region(hrgn);
SetRect(&rc2, 0, 0, 100, 100);
ok(EqualRect(&rcu, &rc2), "rects do not match (%ld,%ld-%ld,%ld) / (%ld,%ld-%ld,%ld)\n",
ok(EqualRect(&rcu, &rc2), "rects do not match (%d,%d-%d,%d) / (%d,%d-%d,%d)\n",
rcu.left, rcu.top, rcu.right, rcu.bottom, rc2.left, rc2.top, rc2.right, rc2.bottom);
SetRectRgn( exprgn, 0, 0, 20, 80);
@ -3130,8 +3130,8 @@ static void test_scrolldc( HWND parent)
CombineRgn(exprgn, exprgn, tmprgn, RGN_OR);
ok(EqualRgn(exprgn, hrgn), "wrong update region\n");
colr = GetPixel( hdc, 80, 80);
ok ( colr == 0, "pixel should be black, color is %08lx\n", colr);
trace("update rect: %ld,%ld - %ld,%ld\n",
ok ( colr == 0, "pixel should be black, color is %08x\n", colr);
trace("update rect: %d,%d - %d,%d\n",
rcu.left, rcu.top, rcu.right, rcu.bottom);
if (winetest_debug > 0) dump_region(hrgn);
@ -3150,7 +3150,7 @@ static void test_params(void)
/* Just a param check */
SetLastError(0xdeadbeef);
rc = GetWindowText(hwndMain2, NULL, 1024);
ok( rc==0, "GetWindowText: rc=%d err=%ld\n",rc,GetLastError());
ok( rc==0, "GetWindowText: rc=%d err=%d\n",rc,GetLastError());
SetLastError(0xdeadbeef);
hwnd=CreateWindow("LISTBOX", "TestList",
@ -3161,7 +3161,7 @@ static void test_params(void)
ok(!hwnd, "CreateWindow with invalid menu handle should fail\n");
ok(GetLastError() == ERROR_INVALID_MENU_HANDLE || /* NT */
GetLastError() == 0xdeadbeef, /* Win9x */
"wrong last error value %ld\n", GetLastError());
"wrong last error value %d\n", GetLastError());
}
static void test_AWRwindow(LPCSTR class, LONG style, LONG exStyle, BOOL menu)
@ -3175,7 +3175,7 @@ static void test_AWRwindow(LPCSTR class, LONG style, LONG exStyle, BOOL menu)
menu ? hmenu : 0,
0, 0);
if (!hwnd) {
trace("Failed to create window class=%s, style=0x%08lx, exStyle=0x%08lx\n", class, style, exStyle);
trace("Failed to create window class=%s, style=0x%08x, exStyle=0x%08x\n", class, style, exStyle);
return;
}
ShowWindow(hwnd, SW_SHOW);
@ -3320,7 +3320,7 @@ static void test_redrawnow(void)
cls.lpszClassName = "RedrawWindowClass";
if(!RegisterClassA(&cls)) {
trace("Register failed %ld\n", GetLastError());
trace("Register failed %d\n", GetLastError());
return;
}
@ -3364,15 +3364,15 @@ static LRESULT WINAPI parentdc_window_procA(HWND hwnd, UINT msg, WPARAM wparam,
trace("doing WM_PAINT on %p\n", hwnd);
GetClientRect(hwnd, &rc);
CopyRect(&t->client, &rc);
trace("client rect (%ld, %ld)-(%ld, %ld)\n", rc.left, rc.top, rc.right, rc.bottom);
trace("client rect (%d, %d)-(%d, %d)\n", rc.left, rc.top, rc.right, rc.bottom);
GetWindowRect(hwnd, &rc);
trace("window rect (%ld, %ld)-(%ld, %ld)\n", rc.left, rc.top, rc.right, rc.bottom);
trace("window rect (%d, %d)-(%d, %d)\n", rc.left, rc.top, rc.right, rc.bottom);
BeginPaint(hwnd, &ps);
CopyRect(&t->paint, &ps.rcPaint);
GetClipBox(ps.hdc, &rc);
CopyRect(&t->clip, &rc);
trace("clip rect (%ld, %ld)-(%ld, %ld)\n", rc.left, rc.top, rc.right, rc.bottom);
trace("paint rect (%ld, %ld)-(%ld, %ld)\n", ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right, ps.rcPaint.bottom);
trace("clip rect (%d, %d)-(%d, %d)\n", rc.left, rc.top, rc.right, rc.bottom);
trace("paint rect (%d, %d)-(%d, %d)\n", ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right, ps.rcPaint.bottom);
EndPaint(hwnd, &ps);
return 0;
}
@ -3395,7 +3395,7 @@ static void zero_parentdc_test(struct parentdc_test *t)
#define parentdc_field_ok(t, w, r, f, got) \
ok (t.w.r.f==got.w.r.f, "window " #w ", rect " #r ", field " #f \
": expected %ld, got %ld\n", \
": expected %d, got %d\n", \
t.w.r.f, got.w.r.f)
#define parentdc_todo_field_ok(t, w, r, f, got) \
@ -3490,7 +3490,7 @@ static void test_csparentdc(void)
clsMain.lpszClassName = "ParentDcMainWindowClass";
if(!RegisterClassA(&clsMain)) {
trace("Register failed %ld\n", GetLastError());
trace("Register failed %d\n", GetLastError());
return;
}
@ -3506,7 +3506,7 @@ static void test_csparentdc(void)
cls.lpszClassName = "ParentDcWindowClass";
if(!RegisterClassA(&cls)) {
trace("Register failed %ld\n", GetLastError());
trace("Register failed %d\n", GetLastError());
return;
}
@ -3696,13 +3696,13 @@ static void test_CreateWindow(void)
#define expect_menu(window, menu) \
SetLastError(0xdeadbeef); \
ok(GetMenu(window) == (HMENU)menu, "GetMenu error %ld\n", GetLastError())
ok(GetMenu(window) == (HMENU)menu, "GetMenu error %d\n", GetLastError())
#define expect_style(window, style)\
ok(GetWindowLong(window, GWL_STYLE) == (style), "expected style %lx != %lx\n", (long)(style), GetWindowLong(window, GWL_STYLE))
ok(GetWindowLong(window, GWL_STYLE) == (style), "expected style %x != %x\n", (LONG)(style), GetWindowLong(window, GWL_STYLE))
#define expect_ex_style(window, ex_style)\
ok(GetWindowLong(window, GWL_EXSTYLE) == (ex_style), "expected ex_style %lx != %lx\n", (long)(ex_style), GetWindowLong(window, GWL_EXSTYLE))
ok(GetWindowLong(window, GWL_EXSTYLE) == (ex_style), "expected ex_style %x != %x\n", (LONG)(ex_style), GetWindowLong(window, GWL_EXSTYLE))
hmenu = CreateMenu();
assert(hmenu != 0);
@ -3710,12 +3710,12 @@ static void test_CreateWindow(void)
assert(parent != 0);
SetLastError(0xdeadbeef);
ok(IsMenu(hmenu), "IsMenu error %ld\n", GetLastError());
ok(IsMenu(hmenu), "IsMenu error %d\n", GetLastError());
SetLastError(0xdeadbeef);
hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_CHILD,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError());
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, 1);
expect_style(hwnd, WS_CHILD);
expect_ex_style(hwnd, WS_EX_APPWINDOW);
@ -3724,7 +3724,7 @@ static void test_CreateWindow(void)
SetLastError(0xdeadbeef);
hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_CAPTION,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError());
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, 1);
expect_style(hwnd, WS_CHILD | WS_CAPTION);
expect_ex_style(hwnd, WS_EX_APPWINDOW | WS_EX_WINDOWEDGE);
@ -3733,7 +3733,7 @@ static void test_CreateWindow(void)
SetLastError(0xdeadbeef);
hwnd = CreateWindowEx(0, "static", NULL, WS_CHILD,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError());
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, 1);
expect_style(hwnd, WS_CHILD);
expect_ex_style(hwnd, 0);
@ -3742,7 +3742,7 @@ static void test_CreateWindow(void)
SetLastError(0xdeadbeef);
hwnd = CreateWindowEx(0, "static", NULL, WS_CHILD | WS_CAPTION,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError());
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, 1);
expect_style(hwnd, WS_CHILD | WS_CAPTION);
expect_ex_style(hwnd, WS_EX_WINDOWEDGE);
@ -3751,70 +3751,70 @@ static void test_CreateWindow(void)
SetLastError(0xdeadbeef);
hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_POPUP,
0, 0, 100, 100, parent, hmenu, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError());
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, hmenu);
expect_style(hwnd, WS_POPUP | WS_CLIPSIBLINGS);
expect_ex_style(hwnd, WS_EX_APPWINDOW);
DestroyWindow(hwnd);
SetLastError(0xdeadbeef);
ok(!IsMenu(hmenu), "IsMenu should fail\n");
ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError());
hmenu = CreateMenu();
assert(hmenu != 0);
SetLastError(0xdeadbeef);
hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_POPUP | WS_CAPTION,
0, 0, 100, 100, parent, hmenu, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError());
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, hmenu);
expect_style(hwnd, WS_POPUP | WS_CAPTION | WS_CLIPSIBLINGS);
expect_ex_style(hwnd, WS_EX_APPWINDOW | WS_EX_WINDOWEDGE);
DestroyWindow(hwnd);
SetLastError(0xdeadbeef);
ok(!IsMenu(hmenu), "IsMenu should fail\n");
ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError());
hmenu = CreateMenu();
assert(hmenu != 0);
SetLastError(0xdeadbeef);
hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_POPUP,
0, 0, 100, 100, parent, hmenu, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError());
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, hmenu);
expect_style(hwnd, WS_POPUP | WS_CLIPSIBLINGS);
expect_ex_style(hwnd, WS_EX_APPWINDOW);
DestroyWindow(hwnd);
SetLastError(0xdeadbeef);
ok(!IsMenu(hmenu), "IsMenu should fail\n");
ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError());
hmenu = CreateMenu();
assert(hmenu != 0);
SetLastError(0xdeadbeef);
hwnd = CreateWindowEx(0, "static", NULL, WS_POPUP | WS_CAPTION,
0, 0, 100, 100, parent, hmenu, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError());
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, hmenu);
expect_style(hwnd, WS_POPUP | WS_CAPTION | WS_CLIPSIBLINGS);
expect_ex_style(hwnd, WS_EX_WINDOWEDGE);
DestroyWindow(hwnd);
SetLastError(0xdeadbeef);
ok(!IsMenu(hmenu), "IsMenu should fail\n");
ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError());
hmenu = CreateMenu();
assert(hmenu != 0);
SetLastError(0xdeadbeef);
hwnd = CreateWindowEx(0, "static", NULL, WS_POPUP,
0, 0, 100, 100, parent, hmenu, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError());
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, hmenu);
expect_style(hwnd, WS_POPUP | WS_CLIPSIBLINGS);
expect_ex_style(hwnd, 0);
DestroyWindow(hwnd);
SetLastError(0xdeadbeef);
ok(!IsMenu(hmenu), "IsMenu should fail\n");
ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError());
#undef expect_menu
#undef expect_style
@ -3840,19 +3840,19 @@ static void test_SetWindowLong(void)
retval = SetWindowLongPtr(NULL, GWLP_WNDPROC, 0);
ok(!retval, "SetWindowLongPtr on invalid window handle should have returned 0 instead of 0x%x\n", retval);
ok(check_error(GetLastError(), ERROR_INVALID_WINDOW_HANDLE),
"SetWindowLongPtr should have set error to ERROR_INVALID_WINDOW_HANDLE instad of %ld\n", GetLastError());
"SetWindowLongPtr should have set error to ERROR_INVALID_WINDOW_HANDLE instad of %d\n", GetLastError());
SetLastError(0xdeadbeef);
retval = SetWindowLongPtr(hwndMain, 0xdeadbeef, 0);
ok(!retval, "SetWindowLongPtr on invalid index should have returned 0 instead of 0x%x\n", retval);
ok(check_error(GetLastError(), ERROR_INVALID_INDEX),
"SetWindowLongPtr should have set error to ERROR_INVALID_INDEX instad of %ld\n", GetLastError());
"SetWindowLongPtr should have set error to ERROR_INVALID_INDEX instad of %d\n", GetLastError());
SetLastError(0xdeadbeef);
retval = SetWindowLongPtr(hwndMain, GWLP_WNDPROC, 0);
ok((WNDPROC)retval == main_window_procA,
"SetWindowLongPtr on invalid window proc should have returned address of main_window_procA instead of 0x%x\n", retval);
ok(GetLastError() == 0xdeadbeef, "SetWindowLongPtr shouldn't have set the last error, instead of setting it to %ld\n", GetLastError());
ok(GetLastError() == 0xdeadbeef, "SetWindowLongPtr shouldn't have set the last error, instead of setting it to %d\n", GetLastError());
retval = GetWindowLongPtr(hwndMain, GWLP_WNDPROC);
ok((WNDPROC)retval == main_window_procA,
"SetWindowLongPtr on invalid window proc shouldn't have changed the value returned by GetWindowLongPtr, instead of changing it to 0x%x\n", retval);
@ -3863,8 +3863,8 @@ static void test_SetWindowLong(void)
retval = SetWindowLongPtrW(hwndMain, GWLP_WNDPROC, 0);
if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
{
ok(GetLastError() == 0xdeadbeef, "SetWindowLongPtr shouldn't have set the last error, instead of setting it to %ld\n", GetLastError());
ok(retval != 0, "SetWindowLongPtr error %ld\n", GetLastError());
ok(GetLastError() == 0xdeadbeef, "SetWindowLongPtr shouldn't have set the last error, instead of setting it to %d\n", GetLastError());
ok(retval != 0, "SetWindowLongPtr error %d\n", GetLastError());
ok((WNDPROC)retval == old_window_procW,
"SetWindowLongPtr on invalid window proc shouldn't have changed the value returned by GetWindowLongPtr, instead of changing it to 0x%x\n", retval);
ok(IsWindowUnicode(hwndMain), "hwndMain should now be Unicode\n");

View File

@ -72,10 +72,10 @@ static DWORD CALLBACK thread( LPVOID arg )
SetLastError( 0xdeadbeef );
ok( !CloseHandle( d1 ), "CloseHandle succeeded\n" );
ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %ld\n", GetLastError() );
ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %d\n", GetLastError() );
SetLastError( 0xdeadbeef );
ok( !CloseDesktop( d1 ), "CloseDesktop succeeded\n" );
ok( GetLastError() == ERROR_BUSY, "bad last error %ld\n", GetLastError() );
ok( GetLastError() == ERROR_BUSY, "bad last error %d\n", GetLastError() );
print_object( d1 );
d2 = CreateDesktop( "foobar2", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL );
trace( "created desktop %p\n", d2 );
@ -83,7 +83,7 @@ static DWORD CALLBACK thread( LPVOID arg )
SetLastError( 0xdeadbeef );
ok( !SetThreadDesktop( d2 ), "set thread desktop succeeded with existing window\n" );
ok( GetLastError() == ERROR_BUSY, "bad last error %ld\n", GetLastError() );
ok( GetLastError() == ERROR_BUSY, "bad last error %d\n", GetLastError() );
DestroyWindow( hwnd );
ok( SetThreadDesktop( d2 ), "set thread desktop failed\n" );
@ -116,7 +116,7 @@ static void test_handles(void)
ok( !CloseWindowStation(w1), "closing process win station succeeded\n" );
SetLastError( 0xdeadbeef );
ok( !CloseHandle(w1), "closing process win station handle succeeded\n" );
ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %ld\n", GetLastError() );
ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %d\n", GetLastError() );
print_object( w1 );
flags = 0;
@ -136,7 +136,7 @@ static void test_handles(void)
ok( w2 != w1, "CreateWindowStation returned default handle\n" );
SetLastError( 0xdeadbeef );
ok( !CloseDesktop( (HDESK)w2 ), "CloseDesktop succeeded on win station\n" );
ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %ld\n", GetLastError() );
ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %d\n", GetLastError() );
ok( CloseWindowStation( w2 ), "CloseWindowStation failed\n" );
w2 = CreateWindowStation("WinSta0", 0, WINSTA_ALL_ACCESS, NULL );
@ -197,11 +197,11 @@ static void test_handles(void)
SetLastError( 0xdeadbeef );
ok( !CloseDesktop(d1), "closing thread desktop succeeded\n" );
ok( GetLastError() == ERROR_BUSY, "bad last error %ld\n", GetLastError() );
ok( GetLastError() == ERROR_BUSY, "bad last error %d\n", GetLastError() );
SetLastError( 0xdeadbeef );
ok( !CloseHandle(d1), "closing thread desktop handle failed\n" );
ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %ld\n", GetLastError() );
ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %d\n", GetLastError() );
ok( DuplicateHandle( GetCurrentProcess(), d1, GetCurrentProcess(), (PHANDLE)&d2, 0,
TRUE, DUPLICATE_SAME_ACCESS ), "DuplicateHandle failed\n" );
@ -218,7 +218,7 @@ static void test_handles(void)
ok( d2 != 0, "create foobar desktop failed\n" );
SetLastError( 0xdeadbeef );
ok( !CloseWindowStation( (HWINSTA)d2 ), "CloseWindowStation succeeded on desktop\n" );
ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %ld\n", GetLastError() );
ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %d\n", GetLastError() );
d3 = OpenDesktop( "foobar", 0, TRUE, DESKTOP_ALL_ACCESS );
ok( d3 != 0, "open foobar desktop failed\n" );

View File

@ -30,7 +30,7 @@ static void wsprintfATest(void)
int rc;
rc=wsprintfA(buf, "%010ld", -1);
ok(rc == 10, "wsPrintfA length failure: rc=%d error=%ld\n",rc,GetLastError());
ok(rc == 10, "wsPrintfA length failure: rc=%d error=%d\n",rc,GetLastError());
ok((lstrcmpA(buf, "-000000001") == 0),
"wsprintfA zero padded negative value failure: buf=[%s]\n",buf);
}
@ -45,7 +45,7 @@ static void wsprintfWTest(void)
rc=wsprintfW(buf, fmt, -1);
if (rc==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
return;
ok(rc == 10, "wsPrintfW length failure: rc=%d error=%ld\n",rc,GetLastError());
ok(rc == 10, "wsPrintfW length failure: rc=%d error=%d\n",rc,GetLastError());
ok((lstrcmpW(buf, target) == 0),
"wsprintfW zero padded negative value failure\n");
}