[PATCH 12/20] dlls/user32/tests: enable compilation with long types
Eric Pouech
eric.pouech at gmail.com
Tue Mar 8 02:31:04 CST 2022
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
---
dlls/user32/tests/Makefile.in | 1
dlls/user32/tests/broadcast.c | 1
dlls/user32/tests/class.c | 1
dlls/user32/tests/clipboard.c | 1
dlls/user32/tests/combo.c | 1
dlls/user32/tests/cursoricon.c | 1
dlls/user32/tests/dce.c | 1
dlls/user32/tests/dde.c | 1
dlls/user32/tests/dialog.c | 1
dlls/user32/tests/edit.c | 1
dlls/user32/tests/generated.c | 1
dlls/user32/tests/input.c | 1
dlls/user32/tests/listbox.c | 1
dlls/user32/tests/menu.c | 1
dlls/user32/tests/monitor.c | 1
dlls/user32/tests/msg.c | 1
dlls/user32/tests/resource.c | 1
dlls/user32/tests/scroll.c | 1
dlls/user32/tests/static.c | 1
dlls/user32/tests/sysparams.c | 1
dlls/user32/tests/text.c | 1
dlls/user32/tests/uitools.c | 1
dlls/user32/tests/win.c | 1498 ++++++++++++++++++++--------------------
dlls/user32/tests/winstation.c | 158 ++--
dlls/user32/tests/wsprintf.c | 8
25 files changed, 832 insertions(+), 854 deletions(-)
diff --git a/dlls/user32/tests/Makefile.in b/dlls/user32/tests/Makefile.in
index f375234af51..dd101d69f3c 100644
--- a/dlls/user32/tests/Makefile.in
+++ b/dlls/user32/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = user32.dll
IMPORTS = user32 gdi32 advapi32 hid
diff --git a/dlls/user32/tests/broadcast.c b/dlls/user32/tests/broadcast.c
index 86f7ec2f26b..a2de4f6bc23 100644
--- a/dlls/user32/tests/broadcast.c
+++ b/dlls/user32/tests/broadcast.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/*
* Unit tests for BroadcastSystemMessage
*
diff --git a/dlls/user32/tests/class.c b/dlls/user32/tests/class.c
index 083aeb80b45..b93d0496ad7 100644
--- a/dlls/user32/tests/class.c
+++ b/dlls/user32/tests/class.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/* Unit test suite for window classes.
*
* Copyright 2002 Mike McCormack
diff --git a/dlls/user32/tests/clipboard.c b/dlls/user32/tests/clipboard.c
index 8ddebfd1c1e..3053de398f9 100644
--- a/dlls/user32/tests/clipboard.c
+++ b/dlls/user32/tests/clipboard.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/*
* Unit test suite for clipboard functions.
*
diff --git a/dlls/user32/tests/combo.c b/dlls/user32/tests/combo.c
index be4a2b4b044..2fc0d1ad9c0 100644
--- a/dlls/user32/tests/combo.c
+++ b/dlls/user32/tests/combo.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/* Unit test suite for combo boxes.
*
* Copyright 2007 Mikolaj Zalewski
diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c
index d6aee461a5d..117d5bf8456 100644
--- a/dlls/user32/tests/cursoricon.c
+++ b/dlls/user32/tests/cursoricon.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/*
* Unit test suite for cursors and icons.
*
diff --git a/dlls/user32/tests/dce.c b/dlls/user32/tests/dce.c
index 5f0eb928f53..613512d0f5f 100644
--- a/dlls/user32/tests/dce.c
+++ b/dlls/user32/tests/dce.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/*
* Unit tests for DCE support
*
diff --git a/dlls/user32/tests/dde.c b/dlls/user32/tests/dde.c
index c41d93a987b..37c78b115ba 100644
--- a/dlls/user32/tests/dde.c
+++ b/dlls/user32/tests/dde.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/*
* Unit tests for DDE functions
*
diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c
index 5c500608710..0ac1d48a375 100644
--- a/dlls/user32/tests/dialog.c
+++ b/dlls/user32/tests/dialog.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/* Unit test suite for the dialog functions.
*
* Copyright 2004 Bill Medland
diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c
index eb65191d77d..1607e9d84d9 100644
--- a/dlls/user32/tests/edit.c
+++ b/dlls/user32/tests/edit.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/* Unit test suite for edit control.
*
* Copyright 2004 Vitaliy Margolen
diff --git a/dlls/user32/tests/generated.c b/dlls/user32/tests/generated.c
index a78e47d9e59..6b80ad8d6f0 100644
--- a/dlls/user32/tests/generated.c
+++ b/dlls/user32/tests/generated.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/* File generated automatically from tools/winapi/tests.dat; do not edit! */
/* This file can be copied, modified and distributed without restriction. */
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index 1a5bff4388b..14641591bff 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/* Test Key event to Key message translation
*
* Copyright 2003 Rein Klazes
diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c
index 5a09282f6a6..0433818bb1d 100644
--- a/dlls/user32/tests/listbox.c
+++ b/dlls/user32/tests/listbox.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/* Unit test suite for list boxes.
*
* Copyright 2003 Ferenc Wagner
diff --git a/dlls/user32/tests/menu.c b/dlls/user32/tests/menu.c
index 4724b292e72..a6afd9cd4fb 100644
--- a/dlls/user32/tests/menu.c
+++ b/dlls/user32/tests/menu.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/*
* Unit tests for menus
*
diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c
index 4578742a707..d0d4ff1f324 100644
--- a/dlls/user32/tests/monitor.c
+++ b/dlls/user32/tests/monitor.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/*
* Unit tests for monitor APIs
*
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index ee949ec9518..a2adf56565d 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/*
* Unit tests for window message handling
*
diff --git a/dlls/user32/tests/resource.c b/dlls/user32/tests/resource.c
index d116fb7462b..97c274c7817 100644
--- a/dlls/user32/tests/resource.c
+++ b/dlls/user32/tests/resource.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/* Unit test suite for resources.
*
* Copyright 2004 Ferenc Wagner
diff --git a/dlls/user32/tests/scroll.c b/dlls/user32/tests/scroll.c
index 98f091abda5..20bb0dc111b 100644
--- a/dlls/user32/tests/scroll.c
+++ b/dlls/user32/tests/scroll.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/*
* Unit tests for scrollbar
*
diff --git a/dlls/user32/tests/static.c b/dlls/user32/tests/static.c
index 7a22c8594da..a5af3315865 100644
--- a/dlls/user32/tests/static.c
+++ b/dlls/user32/tests/static.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/* Unit test suite for static controls.
*
* Copyright 2007 Google (Mikolaj Zalewski)
diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c
index a8487b40878..4f2709094e9 100644
--- a/dlls/user32/tests/sysparams.c
+++ b/dlls/user32/tests/sysparams.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/* Unit test suite for functions SystemParametersInfo and GetSystemMetrics.
*
* Copyright 2002 Andriy Palamarchuk
diff --git a/dlls/user32/tests/text.c b/dlls/user32/tests/text.c
index 9db3d558adf..317fb9a6a29 100644
--- a/dlls/user32/tests/text.c
+++ b/dlls/user32/tests/text.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/*
* DrawText tests
*
diff --git a/dlls/user32/tests/uitools.c b/dlls/user32/tests/uitools.c
index 3b4ab010e44..a3067c518ea 100644
--- a/dlls/user32/tests/uitools.c
+++ b/dlls/user32/tests/uitools.c
@@ -1,4 +1,3 @@
-#undef WINE_NO_LONG_TYPES /* temporary for migration */
/* Unit test suite for user interface functions
*
* Copyright 2009 Nikolay Sivov
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index d6087873f21..319c6d240f2 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -76,7 +76,7 @@ static DWORD our_pid;
static void dump_minmax_info( const MINMAXINFO *minmax )
{
- trace("Reserved=%d,%d MaxSize=%d,%d MaxPos=%d,%d MinTrack=%d,%d MaxTrack=%d,%d\n",
+ trace("Reserved=%ld,%ld MaxSize=%ld,%ld MaxPos=%ld,%ld MinTrack=%ld,%ld MaxTrack=%ld,%ld\n",
minmax->ptReserved.x, minmax->ptReserved.y,
minmax->ptMaxSize.x, minmax->ptMaxSize.y,
minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
@@ -186,7 +186,7 @@ static DWORD wait_for_events( DWORD count, HANDLE *events, DWORD timeout )
else timeout = end - GetTickCount();
}
- ok( ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %#x\n", ret );
+ ok( ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %#lx\n", ret );
return ret;
}
@@ -229,7 +229,7 @@ static void test_parent_owner(void)
test = CreateWindowExA(0, "ToolWindowClass", "Tool window 1",
WS_CHILD, 0, 0, 100, 100, 0, 0, 0, NULL );
ok( !test, "WS_CHILD without parent created\n" );
- ok( GetLastError() == ERROR_TLW_WITH_WSCHILD, "CreateWindowExA error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_TLW_WITH_WSCHILD, "CreateWindowExA error %lu\n", GetLastError() );
/* desktop window */
check_parents( desktop, 0, 0, 0, 0, 0, 0 );
@@ -681,7 +681,7 @@ static DWORD CALLBACK enum_thread( void *arg )
info.cbSize = sizeof(info) + 1;
ret = pGetGUIThreadInfo( GetCurrentThreadId(), &info );
ok( !ret, "GetGUIThreadInfo succeeded with wrong size\n" );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
}
PeekMessageA( &msg, 0, 0, 0, PM_NOREMOVE ); /* make sure we have a message queue */
@@ -741,7 +741,7 @@ static DWORD CALLBACK test_thread_exit_parent_thread( void *args )
params->hwnd = CreateWindowW( L"static", L"parent", WS_OVERLAPPEDWINDOW|WS_VISIBLE,
100, 100, 200, 200, 0, 0, 0, NULL );
- ok( params->hwnd != 0, "CreateWindowExW failed, error %u\n", GetLastError() );
+ ok( params->hwnd != 0, "CreateWindowExW failed, error %lu\n", GetLastError() );
flush_events( TRUE );
SetEvent( params->created_event );
@@ -779,22 +779,22 @@ static void test_thread_exit_destroy(void)
adopter = CreateWindowW( L"static", L"adopter", WS_OVERLAPPEDWINDOW|WS_VISIBLE,
300, 100, 200, 200, 0, 0, 0, NULL );
- ok( adopter != 0, "CreateWindowExW failed, error %u\n", GetLastError() );
+ ok( adopter != 0, "CreateWindowExW failed, error %lu\n", GetLastError() );
flush_events( TRUE );
thread = CreateThread( NULL, 0, test_thread_exit_parent_thread, ¶ms, 0, NULL );
- ok( thread != 0, "CreateThread failed, error %u\n", GetLastError() );
+ ok( thread != 0, "CreateThread failed, error %lu\n", GetLastError() );
WaitForSingleObject( params.created_event, INFINITE );
child1 = CreateWindowW( L"static", L"child1", WS_CHILD|WS_VISIBLE,
50, 50, 50, 50, params.hwnd, 0, 0, NULL );
- ok( child1 != 0, "CreateWindowExW failed, error %u\n", GetLastError() );
+ ok( child1 != 0, "CreateWindowExW failed, error %lu\n", GetLastError() );
child2 = CreateWindowW( L"static", L"child2", WS_CHILD|WS_VISIBLE,
100, 50, 50, 50, params.hwnd, 0, 0, NULL );
- ok( child2 != 0, "CreateWindowExW failed, error %u\n", GetLastError() );
+ ok( child2 != 0, "CreateWindowExW failed, error %lu\n", GetLastError() );
child3 = CreateWindowW( L"static", L"child3", WS_CHILD|WS_VISIBLE,
50, 100, 50, 50, params.hwnd, 0, 0, NULL );
- ok( child3 != 0, "CreateWindowExW failed, error %u\n", GetLastError() );
+ ok( child3 != 0, "CreateWindowExW failed, error %lu\n", GetLastError() );
flush_events( TRUE );
trace("parent %p adopter %p child1 %p child2 %p child3 %p\n", params.hwnd, adopter, child1, child2, child3);
@@ -808,28 +808,28 @@ static void test_thread_exit_destroy(void)
ok( GetCapture() == child1, "GetCapture %p, expected %p\n", GetCapture(), child1 );
ret = SetPropW( child1, L"myprop", UlongToHandle(0xdeadbeef) );
- ok( ret, "SetPropW failed, error %u\n", GetLastError() );
+ ok( ret, "SetPropW failed, error %lu\n", GetLastError() );
ret = SetPropW( child2, L"myprop", UlongToHandle(0xdeadbeef) );
- ok( ret, "SetPropW failed, error %u\n", GetLastError() );
+ ok( ret, "SetPropW failed, error %lu\n", GetLastError() );
old_wndproc = (WNDPROC)GetWindowLongPtrW( child1, GWLP_WNDPROC );
- ok( old_wndproc != NULL, "GetWindowLongPtrW GWLP_WNDPROC failed, error %u\n", GetLastError() );
+ ok( old_wndproc != NULL, "GetWindowLongPtrW GWLP_WNDPROC failed, error %lu\n", GetLastError() );
ret = GetWindowLongW( child1, GWL_STYLE );
- ok( ret == (WS_CHILD|WS_VISIBLE), "GetWindowLongW returned %#x\n", ret );
+ ok( ret == (WS_CHILD|WS_VISIBLE), "GetWindowLongW returned %#lx\n", ret );
SetEvent( params.stop_event );
ret = WaitForSingleObject( thread, INFINITE );
- ok( ret == WAIT_OBJECT_0, "WaitForSingleObject returned %#x\n", ret );
+ ok( ret == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", ret );
CloseHandle( thread );
/* child windows should all still be alive but hidden */
ret = IsWindow( child1 );
- ok( ret, "IsWindow returned %u\n", ret );
+ ok( ret, "IsWindow returned %lu\n", ret );
ret = IsWindow( child2 );
- ok( ret, "IsWindow returned %u\n", ret );
+ ok( ret, "IsWindow returned %lu\n", ret );
ret = IsWindow( child3 );
- ok( ret, "IsWindow returned %u\n", ret );
+ ok( ret, "IsWindow returned %lu\n", ret );
todo_wine
ok( GetActiveWindow() == adopter, "GetActiveWindow %p, expected %p\n", GetActiveWindow(), adopter );
@@ -850,38 +850,38 @@ static void test_thread_exit_destroy(void)
SetLastError( 0xdeadbeef );
ret = GetWindowLongW( child1, GWL_STYLE );
todo_wine
- ok( ret == WS_CHILD, "GetWindowLongW returned %#x\n", ret );
- ok( GetLastError() == 0xdeadbeef, "GetWindowLongW error %u\n", GetLastError() );
+ ok( ret == WS_CHILD, "GetWindowLongW returned %#lx\n", ret );
+ ok( GetLastError() == 0xdeadbeef, "GetWindowLongW error %lu\n", GetLastError() );
ret = SetWindowLongW( child1, GWL_STYLE, WS_CHILD|WS_VISIBLE );
- ok( ret, "SetWindowLongW failed, error %u\n", GetLastError() );
+ ok( ret, "SetWindowLongW failed, error %lu\n", GetLastError() );
ret = GetWindowLongW( child1, GWL_STYLE );
- ok( ret == (WS_CHILD|WS_VISIBLE), "GetWindowLongW returned %#x\n", ret );
+ ok( ret == (WS_CHILD|WS_VISIBLE), "GetWindowLongW returned %#lx\n", ret );
/* and cannot be adopted */
SetLastError( 0xdeadbeef );
tmp = GetParent( child1 );
- ok( tmp == params.hwnd, "GetParent returned %p, error %u\n", tmp, GetLastError() );
- ok( GetLastError() == 0xdeadbeef, "GetWindowLongW error %u\n", GetLastError() );
+ ok( tmp == params.hwnd, "GetParent returned %p, error %lu\n", tmp, GetLastError() );
+ ok( GetLastError() == 0xdeadbeef, "GetWindowLongW error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
tmp = SetParent( child1, adopter );
ok( tmp == 0, "SetParent returned %p\n", tmp );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
tmp = SetParent( child3, adopter );
ok( tmp == 0, "SetParent returned %p\n", tmp );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
tmp = GetParent( child1 );
- ok( tmp == params.hwnd, "GetParent returned %p, error %u\n", tmp, GetLastError() );
- ok( GetLastError() == 0xdeadbeef, "GetWindowLongW error %u\n", GetLastError() );
+ ok( tmp == params.hwnd, "GetParent returned %p, error %lu\n", tmp, GetLastError() );
+ ok( GetLastError() == 0xdeadbeef, "GetWindowLongW error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
ret = GetWindowLongW( params.hwnd, GWL_STYLE );
- ok( ret == 0, "GetWindowLongW returned %#x\n", ret );
- ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "GetWindowLongW error %u\n", GetLastError() );
+ ok( ret == 0, "GetWindowLongW returned %#lx\n", ret );
+ ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "GetWindowLongW error %lu\n", GetLastError() );
wndproc = (WNDPROC)GetWindowLongPtrW( child1, GWLP_WNDPROC );
- ok( wndproc != NULL, "GetWindowLongPtrW GWLP_WNDPROC failed, error %u\n", GetLastError() );
+ ok( wndproc != NULL, "GetWindowLongPtrW GWLP_WNDPROC failed, error %lu\n", GetLastError() );
ok( wndproc == old_wndproc, "GetWindowLongPtrW GWLP_WNDPROC returned %p\n", wndproc );
tmp = GetPropW( child1, L"myprop" );
@@ -892,58 +892,58 @@ static void test_thread_exit_destroy(void)
child = CreateWindowExA( 0, "ToolWindowClass", "Tool window 1", WS_CHILD,
0, 0, 100, 100, child1, 0, 0, NULL );
ok( !child && GetLastError() == ERROR_INVALID_PARAMETER,
- "CreateWindowExA returned %p %u\n", child, GetLastError() );
+ "CreateWindowExA returned %p %lu\n", child, GetLastError() );
ret = MoveWindow( child1, 5, 5, 10, 10, FALSE );
- ok( ret, "MoveWindow failed: %u\n", GetLastError() );
+ ok( ret, "MoveWindow failed: %lu\n", GetLastError() );
/* destroying child1 ourselves succeeds */
ret = DestroyWindow( child1 );
- ok( ret, "DestroyWindow returned %u\n", ret );
+ ok( ret, "DestroyWindow returned %lu\n", ret );
ret = DestroyWindow( child1 );
- ok( !ret, "DestroyWindow returned %u\n", ret );
+ ok( !ret, "DestroyWindow returned %lu\n", ret );
ret = IsWindow( child1 );
- ok( !ret, "IsWindow returned %u\n", ret );
+ ok( !ret, "IsWindow returned %lu\n", ret );
tmp = GetPropW( child1, L"myprop" );
ok( HandleToULong(tmp) == 0, "GetPropW returned %p\n", tmp );
/* child2 is still alive, for now */
ret = IsWindow( child2 );
- ok( ret, "IsWindow returned %u\n", ret );
+ ok( ret, "IsWindow returned %lu\n", ret );
SetLastError( 0xdeadbeef );
ret = SetWindowPos( child2, HWND_TOPMOST, 0, 0, 100, 100, SWP_NOSIZE|SWP_NOMOVE );
todo_wine
ok( !ret, "SetWindowPos succeeded\n" );
todo_wine
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "SetWindowPos returned error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "SetWindowPos returned error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
ret = SetWindowPos( child2, 0, 10, 10, 200, 200, SWP_NOZORDER | SWP_NOACTIVATE );
todo_wine
ok( !ret, "SetWindowPos succeeded\n" );
todo_wine
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "SetWindowPos returned error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "SetWindowPos returned error %lu\n", GetLastError() );
rgn = CreateRectRgn( 5, 5, 15, 15 );
SetLastError( 0xdeadbeef );
ret = SetWindowRgn( child2, rgn, TRUE );
- ok( ret, "SetWindowRgn failed, error %u\n", GetLastError() );
+ ok( ret, "SetWindowRgn failed, error %lu\n", GetLastError() );
DeleteObject( rgn );
wndproc = (WNDPROC)SetWindowLongPtrW( child2, GWLP_WNDPROC, (LONG_PTR)test_thread_exit_wnd_proc );
ret = SendMessageW( child2, WM_USER, 0, 0 );
- ok( ret == 0xdeadbeef, "SendMessageW returned %u, error %u\n", ret, GetLastError() );
+ ok( ret == 0xdeadbeef, "SendMessageW returned %lu, error %lu\n", ret, GetLastError() );
ret = SendMessageW( child2, WM_USER + 1, 0, 0 );
- ok( ret == 0xfeedcafe, "SendMessageW returned %u, error %u\n", ret, GetLastError() );
+ ok( ret == 0xfeedcafe, "SendMessageW returned %lu, error %lu\n", ret, GetLastError() );
ret = SendMessageW( child2, WM_USER + 2, 0, 0 );
- ok( ret == 0, "SendMessageW returned %u, error %u\n", ret, GetLastError() );
+ ok( ret == 0, "SendMessageW returned %lu, error %lu\n", ret, GetLastError() );
ret = GetWindowTextW( child2, buffer, ARRAY_SIZE(buffer) );
- ok( ret == 6, "GetWindowTextW returned %u\n", ret );
+ ok( ret == 6, "GetWindowTextW returned %lu\n", ret );
ok( !wcscmp( buffer, L"child2" ), "GetWindowTextW returned %s\n", debugstr_w( buffer ) );
ret = IsWindow( child2 );
- ok( ret, "IsWindow returned %u\n", ret );
+ ok( ret, "IsWindow returned %lu\n", ret );
/* but peeking any message should reap them all */
PeekMessageW( &msg, child2, 0, 0, PM_REMOVE );
@@ -952,12 +952,12 @@ static void test_thread_exit_destroy(void)
ok( HandleToULong(tmp) == 0, "GetPropW returned %p\n", tmp );
ret = IsWindow( child2 );
- ok( !ret, "IsWindow returned %u\n", ret );
+ ok( !ret, "IsWindow returned %lu\n", ret );
ret = IsWindow( child3 );
todo_wine
- ok( !ret, "IsWindow returned %u\n", ret );
+ ok( !ret, "IsWindow returned %lu\n", ret );
ret = DestroyWindow( child2 );
- ok( !ret, "DestroyWindow returned %u\n", ret );
+ ok( !ret, "DestroyWindow returned %lu\n", ret );
DestroyWindow( adopter );
@@ -1025,7 +1025,7 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
GetClientRect(hwnd, &rc2);
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc1);
- ok(!ret, "got %08lx\n", ret);
+ ok(!ret, "got %08Ix\n", ret);
MapWindowPoints(0, hwnd, (LPPOINT)&rc1, 2);
ok(EqualRect(&rc1, &rc2), "rects do not match %s / %s\n", wine_dbgstr_rect(&rc1),
wine_dbgstr_rect(&rc2));
@@ -1082,7 +1082,7 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
case WM_NCCALCSIZE:
{
LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam);
- ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam);
+ ok(!ret, "got %08Ix (%08Ix %08Ix)\n", ret, wparam, lparam);
return ret;
}
}
@@ -1119,7 +1119,7 @@ static LRESULT WINAPI main_window_procW(HWND hwnd, UINT msg, WPARAM wparam, LPAR
case WM_NCCALCSIZE:
{
LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam);
- ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam);
+ ok(!ret, "got %08Ix (%08Ix %08Ix)\n", ret, wparam, lparam);
return ret;
}
}
@@ -1151,7 +1151,7 @@ static LRESULT WINAPI tool_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
case WM_NCCALCSIZE:
{
LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam);
- ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam);
+ ok(!ret, "got %08Ix (%08Ix %08Ix)\n", ret, wparam, lparam);
return ret;
}
}
@@ -1224,17 +1224,17 @@ static void verify_window_info(const char *hook, HWND hwnd, const WINDOWINFO *in
ok(EqualRect(&rcClient, &info->rcClient), "wrong rcClient for %p in hook %s\n", hwnd, hook);
ok(info->dwStyle == (DWORD)GetWindowLongA(hwnd, GWL_STYLE),
- "wrong dwStyle: %08x != %08x for %p in hook %s\n",
+ "wrong dwStyle: %08lx != %08lx for %p in hook %s\n",
info->dwStyle, GetWindowLongA(hwnd, GWL_STYLE), hwnd, hook);
/* Windows reports some undocumented exstyles in WINDOWINFO, but
* doesn't return them in GetWindowLong(hwnd, GWL_EXSTYLE).
*/
ok((info->dwExStyle & ~0xe0000800) == (DWORD)GetWindowLongA(hwnd, GWL_EXSTYLE),
- "wrong dwExStyle: %08x != %08x for %p in hook %s\n",
+ "wrong dwExStyle: %08lx != %08lx for %p in hook %s\n",
info->dwExStyle, GetWindowLongA(hwnd, GWL_EXSTYLE), hwnd, hook);
status = (GetActiveWindow() == hwnd) ? WS_ACTIVECAPTION : 0;
if (GetForegroundWindow())
- ok(info->dwWindowStatus == status, "wrong dwWindowStatus: %04x != %04x active %p fg %p in hook %s\n",
+ ok(info->dwWindowStatus == status, "wrong dwWindowStatus: %04lx != %04lx active %p fg %p in hook %s\n",
info->dwWindowStatus, status, GetActiveWindow(), GetForegroundWindow(), hook);
/* win2k and XP return broken border info in GetWindowInfo most of
@@ -1244,7 +1244,7 @@ if (0)
{
UINT border;
ok(info->cxWindowBorders == (unsigned)(rcClient.left - rcWindow.left),
- "wrong cxWindowBorders %d != %d\n", info->cxWindowBorders, rcClient.left - rcWindow.left);
+ "wrong cxWindowBorders %d != %ld\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);
@@ -1267,13 +1267,13 @@ static void test_window_info(const char *hook, HWND hwnd)
SetLastError(0xdeadbeef);
ok(!pGetWindowInfo(0, NULL), "GetWindowInfo should fail\n");
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE,
- "got error %d expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError());
+ "got error %ld expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError());
}
SetLastError(0xdeadbeef);
ok(!pGetWindowInfo(0, &info), "GetWindowInfo should fail\n");
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE,
- "got error %d expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError());
+ "got error %ld expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError());
info.cbSize = sizeof(WINDOWINFO);
ok(pGetWindowInfo(hwnd, &info), "GetWindowInfo should not fail\n");
@@ -1422,7 +1422,7 @@ static LRESULT CALLBACK test_standard_scrollbar_proc(HWND hwnd, UINT msg, WPARAM
case WM_NCCALCSIZE:
{
LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wp, lp);
- ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wp, lp);
+ ok(!ret, "got %08Ix (%08Ix %08Ix)\n", ret, wp, lp);
return ret;
}
@@ -1462,28 +1462,28 @@ static void test_nonclient_area(HWND hwnd)
FixedAdjustWindowRectEx(&rc, style, menu, exstyle);
ok(EqualRect(&rc, &rc_window),
- "window rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d, win=%s, calc=%s\n",
+ "window rect does not match: style:exstyle=0x%08lx:0x%08lx, menu=%d, win=%s, calc=%s\n",
style, exstyle, menu, wine_dbgstr_rect(&rc_window), wine_dbgstr_rect(&rc));
rc = rc_client;
MapWindowPoints(hwnd, 0, (LPPOINT)&rc, 2);
wine_AdjustWindowRectEx(&rc, style, menu, exstyle);
ok(EqualRect(&rc, &rc_window),
- "window rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d, win=%s, calc=%s\n",
+ "window rect does not match: style:exstyle=0x%08lx:0x%08lx, menu=%d, win=%s, calc=%s\n",
style, exstyle, menu, wine_dbgstr_rect(&rc_window), wine_dbgstr_rect(&rc));
rc = rc_window;
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
- ok(!ret, "got %08lx\n", ret);
+ ok(!ret, "got %08Ix\n", ret);
MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2);
ok(EqualRect(&rc, &rc_client),
- "client rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d client=%s, calc=%s\n",
+ "client rect does not match: style:exstyle=0x%08lx:0x%08lx, menu=%d client=%s, calc=%s\n",
style, exstyle, menu, wine_dbgstr_rect(&rc_client), wine_dbgstr_rect(&rc));
/* NULL rectangle shouldn't crash */
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, 0);
- ok(ret == 0, "NULL rectangle returned %ld instead of 0\n", ret);
+ ok(ret == 0, "NULL rectangle returned %Id instead of 0\n", ret);
/* and now test AdjustWindowRectEx and WM_NCCALCSIZE on synthetic data */
SetRect(&rc_client, 0, 0, 250, 150);
@@ -1493,17 +1493,17 @@ static void test_nonclient_area(HWND hwnd)
rc = rc_window;
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
- ok(!ret, "got %08lx\n", ret);
+ ok(!ret, "got %08Ix\n", ret);
MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2);
ok(EqualRect(&rc, &rc_client),
- "synthetic rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d, client=%s, calc=%s\n",
+ "synthetic rect does not match: style:exstyle=0x%08lx:0x%08lx, menu=%d, client=%s, calc=%s\n",
style, exstyle, menu, wine_dbgstr_rect(&rc_client), wine_dbgstr_rect(&rc));
/* Test standard scroll bars */
uxtheme = LoadLibraryA("uxtheme.dll");
- ok(!!uxtheme, "Failed to load uxtheme.dll, error %u.\n", GetLastError());
+ ok(!!uxtheme, "Failed to load uxtheme.dll, error %lu.\n", GetLastError());
pIsThemeActive = (void *)GetProcAddress(uxtheme, "IsThemeActive");
- ok(!!pIsThemeActive, "Failed to load IsThemeActive, error %u.\n", GetLastError());
+ ok(!!pIsThemeActive, "Failed to load IsThemeActive, error %lu.\n", GetLastError());
is_theme_active = pIsThemeActive();
memset(&cls, 0, sizeof(cls));
@@ -1521,7 +1521,7 @@ static void test_nonclient_area(HWND hwnd)
parent = CreateWindowA("TestStandardScrollbarParentClass", "parent", WS_POPUP | WS_VISIBLE, 100,
100, 100, 100, NULL, NULL, 0, NULL);
- ok(!!parent, "Failed to create a parent window, error %u.\n", GetLastError());
+ ok(!!parent, "Failed to create a parent window, error %lu.\n", GetLastError());
GetCursorPos(&old_cursor_pos);
/* Place the cursor on the standard scroll bar arrow button when not painting it at all.
@@ -1529,16 +1529,16 @@ static void test_nonclient_area(HWND hwnd)
offset = GetSystemMetrics(SM_CYHSCROLL);
child = CreateWindowA("TestStandardScrollbarClass", "test", WS_CHILD | WS_HSCROLL | WS_VISIBLE,
0, 0, 50, 50, parent, NULL, 0, NULL);
- ok(!!child, "Failed to create a test window, error %u.\n", GetLastError());
+ ok(!!child, "Failed to create a test window, error %lu.\n", GetLastError());
hdc = GetDC(parent);
- ok(!!hdc, "GetDC failed, error %d.\n", GetLastError());
+ ok(!!hdc, "GetDC failed, error %ld.\n", GetLastError());
SetCursorPos(0, 0);
flush_events(TRUE);
RedrawWindow(child, NULL, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ERASENOW | RDW_FRAME);
old_color = GetPixel(hdc, 50 - GetSystemMetrics(SM_CXVSCROLL) / 2,
50 - GetSystemMetrics(SM_CYHSCROLL) / 2);
- ok(old_color == 0xc0c0c0, "Expected color %#x, got %#x.\n", 0xc0c0c0, old_color);
+ ok(old_color == 0xc0c0c0, "Expected color %#x, got %#lx.\n", 0xc0c0c0, old_color);
point.x = 50 - GetSystemMetrics(SM_CXVSCROLL) / 2;
point.y = 50 - GetSystemMetrics(SM_CYHSCROLL) / 2;
@@ -1548,7 +1548,7 @@ static void test_nonclient_area(HWND hwnd)
RedrawWindow(child, NULL, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ERASENOW | RDW_FRAME);
color = GetPixel(hdc, 50 - GetSystemMetrics(SM_CXVSCROLL) / 2,
50 - GetSystemMetrics(SM_CYHSCROLL) / 2);
- ok(color == old_color, "Expected color %#x, got %#x.\n", old_color, color);
+ ok(color == old_color, "Expected color %#lx, got %#lx.\n", old_color, color);
ReleaseDC(parent, hdc);
DestroyWindow(child);
@@ -1558,9 +1558,9 @@ static void test_nonclient_area(HWND hwnd)
offset = GetSystemMetrics(SM_CYHSCROLL) - 1;
child = CreateWindowA("TestStandardScrollbarClass", "test", WS_CHILD | WS_HSCROLL | WS_VISIBLE,
0, 0, 50, 50, parent, NULL, 0, NULL);
- ok(!!child, "Failed to create a test window, error %u.\n", GetLastError());
+ ok(!!child, "Failed to create a test window, error %lu.\n", GetLastError());
hdc = GetDC(parent);
- ok(!!hdc, "GetDC failed, error %d.\n", GetLastError());
+ ok(!!hdc, "GetDC failed, error %ld.\n", GetLastError());
SetCursorPos(0, 0);
flush_events(TRUE);
@@ -1578,10 +1578,10 @@ static void test_nonclient_area(HWND hwnd)
50 - GetSystemMetrics(SM_CYHSCROLL) / 2);
if (is_theme_active)
ok(color != old_color || broken(color == old_color), /* Win 10 1507 64-bit */
- "Got unexpected color %#x.\n", color);
+ "Got unexpected color %#lx.\n", color);
else
todo_wine
- ok(color == old_color, "Expected color %#x, got %#x.\n", old_color, color);
+ ok(color == old_color, "Expected color %#lx, got %#lx.\n", old_color, color);
SetCursorPos(old_cursor_pos.x, old_cursor_pos.y);
ReleaseDC(parent, hdc);
@@ -1623,7 +1623,7 @@ static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
/* WS_VISIBLE should be turned off yet */
style = createwnd->lpcs->style & ~WS_VISIBLE;
ok(style == GetWindowLongA(hwnd, GWL_STYLE),
- "style of hwnd and style in the CREATESTRUCT do not match: %08x != %08x\n",
+ "style of hwnd and style in the CREATESTRUCT do not match: %08lx != %08lx\n",
GetWindowLongA(hwnd, GWL_STYLE), style);
if (0)
@@ -1827,7 +1827,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
mdi_child = (HWND)SendMessageA(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
- ok(id == first_id, "wrong child id %ld\n", id);
+ ok(id == first_id, "wrong child id %Id\n", id);
hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
exp_hwnd = (GetWindowLongW(mdi_child, GWL_STYLE) & WS_VISIBLE) ? mdi_child : 0;
ok(hwnd == exp_hwnd, "WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd, hwnd);
@@ -1838,7 +1838,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
mdi_child = (HWND)SendMessageA(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
- ok(id == first_id, "wrong child id %ld\n", id);
+ ok(id == first_id, "wrong child id %Id\n", id);
hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd);
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
@@ -1854,7 +1854,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
{
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
- ok(id == first_id, "wrong child id %ld\n", id);
+ ok(id == first_id, "wrong child id %Id\n", id);
hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd);
ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu));
@@ -1871,7 +1871,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
mdi_child = (HWND)SendMessageW(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
- ok(id == first_id, "wrong child id %ld\n", id);
+ ok(id == first_id, "wrong child id %Id\n", id);
hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
exp_hwnd = (GetWindowLongW(mdi_child, GWL_STYLE) & WS_VISIBLE) ? mdi_child : 0;
ok(hwnd == exp_hwnd, "WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd, hwnd);
@@ -1887,7 +1887,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
(LPARAM)mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
- ok(id == first_id, "wrong child id %ld\n", id);
+ ok(id == first_id, "wrong child id %Id\n", id);
hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
exp_hwnd = (GetWindowLongW(mdi_child, GWL_STYLE) & WS_VISIBLE) ? mdi_child : 0;
ok(hwnd == exp_hwnd, "WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd, hwnd);
@@ -1903,7 +1903,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
(LPARAM)mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
- ok(id == first_id, "wrong child id %ld\n", id);
+ ok(id == first_id, "wrong child id %Id\n", id);
hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd);
ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu));
@@ -1924,7 +1924,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
{
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
- ok(id == first_id, "wrong child id %ld\n", id);
+ ok(id == first_id, "wrong child id %Id\n", id);
hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd);
ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu));
@@ -1942,7 +1942,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
(LPARAM)mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
- ok(id == first_id, "wrong child id %ld\n", id);
+ ok(id == first_id, "wrong child id %Id\n", id);
hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
exp_hwnd = (GetWindowLongW(mdi_child, GWL_STYLE) & WS_VISIBLE) ? mdi_child : 0;
ok(hwnd == exp_hwnd, "WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd, hwnd);
@@ -1958,7 +1958,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
- ok(id == first_id, "wrong child id %ld\n", id);
+ ok(id == first_id, "wrong child id %Id\n", id);
hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
exp_hwnd = (GetWindowLongW(mdi_child, GWL_STYLE) & WS_VISIBLE) ? mdi_child : 0;
ok(hwnd == exp_hwnd, "WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd, hwnd);
@@ -1974,7 +1974,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
- ok(id == first_id, "wrong child id %ld\n", id);
+ ok(id == first_id, "wrong child id %Id\n", id);
hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
exp_hwnd = (GetWindowLongW(mdi_child, GWL_STYLE) & WS_VISIBLE) ? mdi_child : 0;
ok(hwnd == exp_hwnd, "WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd, hwnd);
@@ -1993,7 +1993,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
- ok(id == first_id, "wrong child id %ld\n", id);
+ ok(id == first_id, "wrong child id %Id\n", id);
hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd);
ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu));
@@ -2014,7 +2014,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
{
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
- ok(id == first_id, "wrong child id %ld\n", id);
+ ok(id == first_id, "wrong child id %Id\n", id);
hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd);
ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu));
@@ -2032,7 +2032,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
- ok(id == first_id, "wrong child id %ld\n", id);
+ ok(id == first_id, "wrong child id %Id\n", id);
hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
exp_hwnd = (GetWindowLongW(mdi_child, GWL_STYLE) & WS_VISIBLE) ? mdi_child : 0;
ok(hwnd == exp_hwnd, "WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd, hwnd);
@@ -2056,7 +2056,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
- ok(id == 0, "wrong child id %ld\n", id);
+ ok(id == 0, "wrong child id %Id\n", id);
ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu));
hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd);
@@ -2070,7 +2070,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
- ok(id == 0, "wrong child id %ld\n", id);
+ ok(id == 0, "wrong child id %Id\n", id);
hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd);
ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu));
@@ -2085,7 +2085,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
- ok(id == 0, "wrong child id %ld\n", id);
+ ok(id == 0, "wrong child id %Id\n", id);
hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd);
ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu));
@@ -2099,7 +2099,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
- ok(id == 0, "wrong child id %ld\n", id);
+ ok(id == 0, "wrong child id %Id\n", id);
hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd);
ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu));
@@ -2113,7 +2113,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
- ok(id == 0, "wrong child id %ld\n", id);
+ ok(id == 0, "wrong child id %Id\n", id);
hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd);
ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu));
@@ -2233,7 +2233,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 == WS_MAXIMIZE,
- "mdi_cs->style does not match (%08x)\n", mdi_cs->style);
+ "mdi_cs->style does not match (%08lx)\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);
@@ -2253,7 +2253,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 (%08x)\n", cs->style);
+ "cs->style does not match (%08lx)\n", cs->style);
}
else
{
@@ -2262,7 +2262,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 (%08x)\n", cs->style);
+ "cs->style does not match (%08lx)\n", cs->style);
}
break;
}
@@ -2286,13 +2286,13 @@ static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, L
AdjustWindowRectEx(&rc, style, 0, exstyle);
if (winetest_debug > 1)
{
- trace("MDI child: calculated max window size = (%d x %d)\n", rc.right-rc.left, rc.bottom-rc.top);
+ trace("MDI child: calculated max window size = (%ld x %ld)\n", rc.right-rc.left, rc.bottom-rc.top);
dump_minmax_info( minmax );
}
- ok(minmax->ptMaxSize.x == rc.right - rc.left, "default width of maximized child %d != %d\n",
+ ok(minmax->ptMaxSize.x == rc.right - rc.left, "default width of maximized child %ld != %ld\n",
minmax->ptMaxSize.x, rc.right - rc.left);
- ok(minmax->ptMaxSize.y == rc.bottom - rc.top, "default height of maximized child %d != %d\n",
+ ok(minmax->ptMaxSize.y == rc.bottom - rc.top, "default height of maximized child %ld != %ld\n",
minmax->ptMaxSize.y, rc.bottom - rc.top);
DefMDIChildProcA(hwnd, msg, wparam, lparam);
@@ -2304,9 +2304,9 @@ static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, L
}
MDI_ChildGetMinMaxInfo(client, hwnd, &my_minmax);
- ok(minmax->ptMaxSize.x == my_minmax.ptMaxSize.x, "default width of maximized child %d != %d\n",
+ ok(minmax->ptMaxSize.x == my_minmax.ptMaxSize.x, "default width of maximized child %ld != %ld\n",
minmax->ptMaxSize.x, my_minmax.ptMaxSize.x);
- ok(minmax->ptMaxSize.y == my_minmax.ptMaxSize.y, "default height of maximized child %d != %d\n",
+ ok(minmax->ptMaxSize.y == my_minmax.ptMaxSize.y, "default height of maximized child %ld != %ld\n",
minmax->ptMaxSize.y, my_minmax.ptMaxSize.y);
return 1;
@@ -2369,7 +2369,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, L
GetClientRect(parent, &rc);
if (winetest_debug > 1)
{
- trace("WM_GETMINMAXINFO: parent %p client size = (%d x %d)\n", parent, rc.right, rc.bottom);
+ trace("WM_GETMINMAXINFO: parent %p client size = (%ld x %ld)\n", parent, rc.right, rc.bottom);
dump_minmax_info( minmax );
}
GetClientRect(parent, &rc);
@@ -2377,9 +2377,9 @@ static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, L
style &= ~WS_BORDER; /* WS_CAPTION = WS_DLGFRAME | WS_BORDER */
AdjustWindowRectEx(&rc, style, 0, exstyle);
- ok(minmax->ptMaxSize.x == rc.right - rc.left, "default width of maximized child %d != %d\n",
+ ok(minmax->ptMaxSize.x == rc.right - rc.left, "default width of maximized child %ld != %ld\n",
minmax->ptMaxSize.x, rc.right - rc.left);
- ok(minmax->ptMaxSize.y == rc.bottom - rc.top, "default height of maximized child %d != %d\n",
+ ok(minmax->ptMaxSize.y == rc.bottom - rc.top, "default height of maximized child %ld != %ld\n",
minmax->ptMaxSize.y, rc.bottom - rc.top);
break;
}
@@ -2399,7 +2399,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, L
GetWindowRect(hwnd, &rc1);
GetClientRect(hwnd, &rc2);
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc1);
- ok(!ret, "got %08lx\n", ret);
+ ok(!ret, "got %08Ix\n", ret);
MapWindowPoints(0, hwnd, (LPPOINT)&rc1, 2);
ok(EqualRect(&rc1, &rc2), "rects do not match, window=%s client=%s\n",
wine_dbgstr_rect(&rc1), wine_dbgstr_rect(&rc2));
@@ -2429,7 +2429,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, L
case WM_NCCALCSIZE:
{
LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam);
- ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam);
+ ok(!ret, "got %08Ix (%08Ix %08Ix)\n", ret, wparam, lparam);
return ret;
}
}
@@ -2492,7 +2492,7 @@ static LRESULT WINAPI mdi_main_wnd_procA(HWND hwnd, UINT msg, WPARAM wparam, LPA
case WM_NCCALCSIZE:
{
LRESULT ret = DefFrameProcA(hwnd, mdi_client, WM_NCCALCSIZE, wparam, lparam);
- ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam);
+ ok(!ret, "got %08Ix (%08Ix %08Ix)\n", ret, wparam, lparam);
return ret;
}
@@ -2562,7 +2562,7 @@ static void test_mdi(void)
SCROLLINFO si;
BOOL ret, gotit;
- winetest_push_context("style %#x", style[i]);
+ winetest_push_context("style %#lx", style[i]);
mdi_client = CreateWindowExA(0, "mdiclient", NULL,
WS_CHILD | style[i],
0, 0, rc.right, rc.bottom,
@@ -2797,11 +2797,11 @@ static void check_icon_size_( int line, HICON icon, LONG width, LONG height )
BOOL ret;
ret = GetIconInfo( icon, &info );
- ok_(__FILE__, line)(ret, "failed to get icon info, error %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "failed to get icon info, error %lu\n", GetLastError());
ret = GetObjectW(info.hbmColor, sizeof(bitmap), &bitmap);
- ok_(__FILE__, line)(ret, "failed to get bitmap, error %u\n", GetLastError());
- ok_(__FILE__, line)(bitmap.bmWidth == width, "expected width %d, got %d\n", width, bitmap.bmWidth);
- ok_(__FILE__, line)(bitmap.bmHeight == height, "expected height %d, got %d\n", height, bitmap.bmHeight);
+ ok_(__FILE__, line)(ret, "failed to get bitmap, error %lu\n", GetLastError());
+ ok_(__FILE__, line)(bitmap.bmWidth == width, "expected width %ld, got %d\n", width, bitmap.bmWidth);
+ ok_(__FILE__, line)(bitmap.bmHeight == height, "expected height %ld, got %d\n", height, bitmap.bmHeight);
}
#define check_internal_icon_size(a, b, c, d) check_internal_icon_size_(__LINE__, a, b, c, d)
@@ -2814,7 +2814,7 @@ static void check_internal_icon_size_( int line, HANDLE window, UINT type, LONG
ok_(__FILE__, line)(icon != 0, "expected nonzero icon\n");
check_icon_size_( line, icon, width, height );
ret = DestroyIcon( icon );
- ok_(__FILE__, line)(ret, "failed to destroy icon, error %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "failed to destroy icon, error %lu\n", GetLastError());
}
static DWORD WINAPI internal_get_icon_thread(void *arg)
@@ -2825,7 +2825,7 @@ static DWORD WINAPI internal_get_icon_thread(void *arg)
icon = pInternalGetWindowIcon( arg, ICON_BIG );
ok( icon != 0, "expected nonzero icon\n" );
ret = DestroyIcon( icon );
- ok( ret, "got error %u\n", GetLastError() );
+ ok( ret, "got error %lu\n", GetLastError() );
return 0;
}
@@ -2861,15 +2861,15 @@ static void test_icons(void)
SetLastError( 0xdeadbeef );
res = pInternalGetWindowIcon( hwnd, ICON_BIG );
ok( res != 0, "expected nonzero icon\n" );
- ok( GetLastError() == 0xdeadbeef, "got error %u\n", GetLastError() );
+ ok( GetLastError() == 0xdeadbeef, "got error %lu\n", GetLastError() );
check_icon_size( res, 40, 40 );
res2 = pInternalGetWindowIcon( hwnd, ICON_BIG );
ok( res2 && res2 != res, "got %p\n", res2 );
check_icon_size( res2, 40, 40 );
ret = DestroyIcon( res2 );
- ok( ret, "got error %u\n", GetLastError() );
+ ok( ret, "got error %lu\n", GetLastError() );
ret = DestroyIcon( res );
- ok( ret, "got error %u\n", GetLastError() );
+ ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL, 0 );
ok( !res, "wrong small icon %p\n", res );
@@ -2880,9 +2880,9 @@ static void test_icons(void)
ok( res2 && res2 != res, "got %p\n", res2 );
check_icon_size( res2, 50, 50 );
ret = DestroyIcon( res2 );
- ok( ret, "got error %u\n", GetLastError() );
+ ok( ret, "got error %lu\n", GetLastError() );
ret = DestroyIcon( res );
- ok( ret, "got error %u\n", GetLastError() );
+ ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL2, 0 );
ok( !res, "wrong small2 icon %p\n", res );
@@ -2893,9 +2893,9 @@ static void test_icons(void)
ok( res2 && res2 != res, "got %p\n", res2 );
check_icon_size( res2, 50, 50 );
ret = DestroyIcon( res2 );
- ok( ret, "got error %u\n", GetLastError() );
+ ok( ret, "got error %lu\n", GetLastError() );
ret = DestroyIcon( res );
- ok( ret, "got error %u\n", GetLastError() );
+ ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_SETICON, ICON_BIG, (LPARAM)icon );
ok( res == 0, "wrong previous big icon %p/0\n", res );
@@ -2905,7 +2905,7 @@ static void test_icons(void)
ok( res2 && res2 != icon, "got %p\n", res2 );
check_icon_size( res2, 10, 10 );
ret = DestroyIcon( res2 );
- ok( ret, "got error %u\n", GetLastError() );
+ ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_SETICON, ICON_BIG, (LPARAM)icon2 );
ok( res == icon, "wrong previous big icon %p/%p\n", res, icon );
@@ -2915,7 +2915,7 @@ static void test_icons(void)
ok( res2 && res2 != icon2, "got %p\n", res2 );
check_icon_size( res2, 20, 20 );
ret = DestroyIcon( res2 );
- ok( ret, "got error %u\n", GetLastError() );
+ ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL, 0 );
ok( res == 0, "wrong small icon %p/0\n", res );
@@ -2923,7 +2923,7 @@ static void test_icons(void)
ok( res2 != 0, "expected nonzero icon\n" );
check_icon_size( res2, small_width, small_height );
ret = DestroyIcon( res2 );
- ok( ret, "got error %u\n", GetLastError() );
+ ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL2, 0 );
ok( res && res != icon3 && res != icon2, "wrong small2 icon %p\n", res );
@@ -2934,7 +2934,7 @@ static void test_icons(void)
ok( res2 && res2 != icon3 && res2 != icon2 && res2 != res, "got %p\n", res2 );
check_icon_size( res2, small_width, small_height );
ret = DestroyIcon( res2 );
- ok( ret, "got error %u\n", GetLastError() );
+ ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_SETICON, ICON_SMALL, (LPARAM)icon );
ok( res == 0, "wrong previous small icon %p/0\n", res );
@@ -2944,7 +2944,7 @@ static void test_icons(void)
ok( res2 && res2 != icon, "got %p\n", res2 );
check_icon_size( res2, 10, 10 );
ret = DestroyIcon( res2 );
- ok( ret, "got error %u\n", GetLastError() );
+ ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL2, 0 );
ok( res == icon, "wrong small2 icon after set %p/%p\n", res, icon );
@@ -2952,7 +2952,7 @@ static void test_icons(void)
ok( res2 && res2 != icon && res2 != res, "got %p\n", res2 );
check_icon_size( res2, 10, 10 );
ret = DestroyIcon( res2 );
- ok( ret, "got error %u\n", GetLastError() );
+ ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_SETICON, ICON_SMALL, (LPARAM)icon3 );
ok( res == icon, "wrong previous small icon %p/%p\n", res, icon );
@@ -2962,7 +2962,7 @@ static void test_icons(void)
ok( res2 && res2 != icon3, "got %p\n", res2 );
check_icon_size( res2, 30, 30 );
ret = DestroyIcon( res2 );
- ok( ret, "got error %u\n", GetLastError() );
+ ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL2, 0 );
ok( res == icon3, "wrong small2 icon after set %p/%p\n", res, icon3 );
@@ -2970,7 +2970,7 @@ static void test_icons(void)
ok( res2 && res2 != icon3 && res2 != res, "got %p\n", res2 );
check_icon_size( res2, 30, 30 );
ret = DestroyIcon( res2 );
- ok( ret, "got error %u\n", GetLastError() );
+ ok( ret, "got error %lu\n", GetLastError() );
/* make sure the big icon hasn't changed */
res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_BIG, 0 );
@@ -2979,17 +2979,17 @@ static void test_icons(void)
ok( res2 && res2 != icon2, "got %p\n", res2 );
check_icon_size( res2, 20, 20 );
ret = DestroyIcon( res2 );
- ok( ret, "got error %u\n", GetLastError() );
+ ok( ret, "got error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
res = pInternalGetWindowIcon( NULL, ICON_BIG );
ok( !res, "got %p\n", res );
- ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
res = pInternalGetWindowIcon( hwnd, 0xdeadbeef );
ok( !res, "got %p\n", res );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError() );
thread = CreateThread( NULL, 0, internal_get_icon_thread, hwnd, 0, NULL );
ret = WaitForSingleObject( thread, 1000 );
@@ -3133,13 +3133,13 @@ static void test_SetWindowPos(HWND hwnd, HWND hwnd2)
ok(ret, "Got %d\n", ret);
hwnd_desktop = GetDesktopWindow();
- ok(!!hwnd_desktop, "Failed to get hwnd_desktop window (%d).\n", GetLastError());
+ ok(!!hwnd_desktop, "Failed to get hwnd_desktop window (%ld).\n", GetLastError());
hwnd_child = create_tool_window(WS_VISIBLE|WS_CHILD, hwnd);
- ok(!!hwnd_child, "Failed to create child window (%d)\n", GetLastError());
+ ok(!!hwnd_child, "Failed to create child window (%ld)\n", GetLastError());
hwnd_grandchild = create_tool_window(WS_VISIBLE|WS_CHILD, hwnd_child);
- ok(!!hwnd_child, "Failed to create child window (%d)\n", GetLastError());
+ ok(!!hwnd_child, "Failed to create child window (%ld)\n", GetLastError());
hwnd_child2 = create_tool_window(WS_VISIBLE|WS_CHILD, hwnd);
- ok(!!hwnd_child2, "Failed to create second child window (%d)\n", GetLastError());
+ ok(!!hwnd_child2, "Failed to create second child window (%ld)\n", GetLastError());
ret = SetWindowPos(hwnd, hwnd2, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
ok(ret, "Got %d\n", ret);
@@ -3277,7 +3277,7 @@ static void test_SetWindowPos(HWND hwnd, HWND hwnd2)
DestroyWindow(hwnd_child2);
hwnd_child = create_tool_window(WS_CHILD|WS_POPUP|WS_SYSMENU, hwnd2);
- ok(!!hwnd_child, "Failed to create child window (%d)\n", GetLastError());
+ ok(!!hwnd_child, "Failed to create child window (%ld)\n", GetLastError());
ret = SetWindowPos(hwnd_child, NULL, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_SHOWWINDOW);
ok(ret, "Got %d\n", ret);
flush_events( TRUE );
@@ -3305,7 +3305,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 %d\n", GetLastError());
+ ok( retok, "DestroyMenu error %ld\n", GetLastError());
retok = IsMenu(hMenu);
ok(!retok, "menu handle should be not valid after DestroyMenu\n");
ret = GetMenu(parent);
@@ -3409,7 +3409,7 @@ static void test_window_tree(HWND parent, const DWORD *style, const int *order,
for (i = 0; i < total; i++)
{
- ok(child[order[i]] == hwnd, "Z order of child #%ld is wrong\n", i);
+ ok(child[order[i]] == hwnd, "Z order of child #%Id is wrong\n", i);
hwnd = GetWindow(hwnd, GW_HWNDNEXT);
}
@@ -3677,7 +3677,7 @@ static void test_SetFocus(HWND hwnd)
ok( GetFocus() == child, "Focus should be on child %p\n", child );
SetLastError(0xdeadbeef);
EnableWindow(hwnd, FALSE);
- ok(GetLastError() == 0xdeadbeef, "got error %u in EnableWindow call\n", GetLastError());
+ ok(GetLastError() == 0xdeadbeef, "got error %lu in EnableWindow call\n", GetLastError());
ok( GetFocus() == child, "Focus should still be on child %p\n", child );
EnableWindow(hwnd, TRUE);
@@ -3736,16 +3736,16 @@ static void test_SetActiveWindow_0_proc( char **argv )
sscanf( argv[3], "%p", &other );
start_event = CreateEventW( NULL, FALSE, FALSE, L"test_SetActiveWindow_0_start" );
- ok( start_event != 0, "CreateEventW failed, error %u\n", GetLastError() );
+ ok( start_event != 0, "CreateEventW failed, error %lu\n", GetLastError() );
stop_event = CreateEventW( NULL, FALSE, FALSE, L"test_SetActiveWindow_0_stop" );
- ok( stop_event != 0, "CreateEventW failed, error %u\n", GetLastError() );
+ ok( stop_event != 0, "CreateEventW failed, error %lu\n", GetLastError() );
hwnd = CreateWindowExA( 0, "static", NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE, 100, 100, 200, 200, 0, 0, NULL, NULL );
- ok( !!hwnd, "CreateWindowExA failed, error %u\n", GetLastError() );
+ ok( !!hwnd, "CreateWindowExA failed, error %lu\n", GetLastError() );
flush_events( TRUE );
ret = SetForegroundWindow( hwnd );
- ok( ret, "SetForegroundWindow failed, error %u\n", GetLastError() );
+ ok( ret, "SetForegroundWindow failed, error %lu\n", GetLastError() );
tmp = GetForegroundWindow();
ok( tmp == hwnd, "GetForegroundWindow returned %p\n", tmp );
@@ -3756,12 +3756,12 @@ static void test_SetActiveWindow_0_proc( char **argv )
SetLastError( 0xdeadbeef );
tmp = SetActiveWindow( 0 );
- if (!tmp) ok( GetLastError() == 0xdeadbeef, "got error %u\n", GetLastError() );
+ if (!tmp) ok( GetLastError() == 0xdeadbeef, "got error %lu\n", GetLastError() );
else /* < Win10 */
{
ok( tmp == hwnd, "SetActiveWindow returned %p\n", tmp );
todo_wine
- ok( GetLastError() == 0, "got error %u\n", GetLastError() );
+ ok( GetLastError() == 0, "got error %lu\n", GetLastError() );
tmp = GetForegroundWindow();
ok( tmp == other || tmp == 0, "GetForegroundWindow returned %p\n", tmp );
@@ -3809,7 +3809,7 @@ static void test_SetActiveWindow_0( char **argv )
BOOL ret;
hwnd = CreateWindowExA( 0, "static", NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE, 100, 100, 200, 200, 0, 0, NULL, NULL );
- ok( !!hwnd, "CreateWindowExA failed, error %u\n", GetLastError() );
+ ok( !!hwnd, "CreateWindowExA failed, error %lu\n", GetLastError() );
SetWindowPos( hwnd, HWND_TOPMOST, 150, 150, 300, 300, SWP_FRAMECHANGED | SWP_SHOWWINDOW );
flush_events( TRUE );
@@ -3821,13 +3821,13 @@ static void test_SetActiveWindow_0( char **argv )
ok( tmp == hwnd, "GetFocus returned %p\n", tmp );
events[1] = CreateEventW( NULL, FALSE, FALSE, L"test_SetActiveWindow_0_start" );
- ok( events[1] != 0, "CreateEventW failed, error %u\n", GetLastError() );
+ ok( events[1] != 0, "CreateEventW failed, error %lu\n", GetLastError() );
events[2] = CreateEventW( NULL, FALSE, FALSE, L"test_SetActiveWindow_0_stop" );
- ok( events[2] != 0, "CreateEventW failed, error %u\n", GetLastError() );
+ ok( events[2] != 0, "CreateEventW failed, error %lu\n", GetLastError() );
sprintf( cmdline, "%s %s SetActiveWindow_0 %p", argv[0], argv[1], hwnd );
ret = CreateProcessA( NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &startup, &info );
- ok( ret, "CreateProcessA failed, error %u\n", GetLastError() );
+ ok( ret, "CreateProcessA failed, error %lu\n", GetLastError() );
events[0] = info.hProcess;
if (wait_for_events( 2, events, INFINITE ) == 1)
@@ -3903,7 +3903,7 @@ static void test_SetActiveWindow(HWND hwnd)
ret = SetActiveWindow(GetDesktopWindow());
ok(ret == NULL, "expected NULL, got %p\n", ret);
todo_wine
- ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", GetLastError());
+ ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", GetLastError());
check_wnd_state(hwnd, hwnd, hwnd, 0);
/* activating a child should activate the parent */
@@ -3932,10 +3932,10 @@ static DWORD WINAPI create_window_thread(void *param)
p->window = CreateWindowA("static", NULL, WS_POPUP | WS_VISIBLE, 0, 0, 0, 0, 0, 0, 0, 0);
ret = SetEvent(p->window_created);
- ok(ret, "SetEvent failed, last error %#x.\n", GetLastError());
+ ok(ret, "SetEvent failed, last error %#lx.\n", GetLastError());
res = WaitForSingleObject(p->test_finished, INFINITE);
- ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError());
+ ok(res == WAIT_OBJECT_0, "Wait failed (%#lx), last error %#lx.\n", res, GetLastError());
DestroyWindow(p->window);
return 0;
@@ -3970,7 +3970,7 @@ static void test_SetForegroundWindow(HWND hwnd)
ret = SetForegroundWindow(0);
ok(!ret, "SetForegroundWindow returned TRUE instead of FALSE\n");
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE,
- "got error %d expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError());
+ "got error %ld 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);
@@ -3982,7 +3982,7 @@ static void test_SetForegroundWindow(HWND hwnd)
hwnd2 = GetForegroundWindow();
ok(hwnd2 == hwnd, "Wrong foreground window %p\n", hwnd2);
ret = SetForegroundWindow( GetDesktopWindow() );
- ok(ret, "SetForegroundWindow(desktop) error: %d\n", GetLastError());
+ ok(ret, "SetForegroundWindow(desktop) error: %ld\n", GetLastError());
hwnd2 = GetForegroundWindow();
ok(hwnd2 != hwnd, "Wrong foreground window %p\n", hwnd2);
@@ -4016,13 +4016,13 @@ static void test_SetForegroundWindow(HWND hwnd)
check_wnd_state(hwnd2, hwnd2, hwnd2, 0);
thread_params.window_created = CreateEventW(NULL, FALSE, FALSE, NULL);
- ok(!!thread_params.window_created, "CreateEvent failed, last error %#x.\n", GetLastError());
+ ok(!!thread_params.window_created, "CreateEvent failed, last error %#lx.\n", GetLastError());
thread_params.test_finished = CreateEventW(NULL, FALSE, FALSE, NULL);
- ok(!!thread_params.test_finished, "CreateEvent failed, last error %#x.\n", GetLastError());
+ ok(!!thread_params.test_finished, "CreateEvent failed, last error %#lx.\n", GetLastError());
thread = CreateThread(NULL, 0, create_window_thread, &thread_params, 0, &tid);
- ok(!!thread, "Failed to create thread, last error %#x.\n", GetLastError());
+ ok(!!thread, "Failed to create thread, last error %#lx.\n", GetLastError());
res = WaitForSingleObject(thread_params.window_created, INFINITE);
- ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError());
+ ok(res == WAIT_OBJECT_0, "Wait failed (%#lx), last error %#lx.\n", res, GetLastError());
check_wnd_state(hwnd2, thread_params.window, hwnd2, 0);
SetForegroundWindow(hwnd2);
@@ -4235,11 +4235,11 @@ static LRESULT CALLBACK test_capture_4_proc(HWND hWnd, UINT msg, WPARAM wParam,
gti.cbSize = sizeof(GUITHREADINFO);
status = pGetGUIThreadInfo(GetCurrentThreadId(), >i);
ok(status, "GetGUIThreadInfo() failed!\n");
- ok(gti.flags & GUI_INMENUMODE, "Thread info incorrect (flags=%08X)!\n", gti.flags);
+ ok(gti.flags & GUI_INMENUMODE, "Thread info incorrect (flags=%08lX)!\n", gti.flags);
}
cap_wnd = GetCapture();
- ok(cap_wnd == (HWND)lParam, "capture window %p does not match lparam %lx\n", cap_wnd, lParam);
+ ok(cap_wnd == (HWND)lParam, "capture window %p does not match lparam %Ix\n", cap_wnd, lParam);
todo_wine ok(cap_wnd == hWnd, "capture window %p does not match hwnd %p\n", cap_wnd, hWnd);
/* check that re-setting the capture for the menu fails */
@@ -4266,7 +4266,7 @@ static LRESULT CALLBACK test_capture_4_proc(HWND hWnd, UINT msg, WPARAM wParam,
gti.cbSize = sizeof(GUITHREADINFO);
status = pGetGUIThreadInfo(GetCurrentThreadId(), >i);
ok(status, "GetGUIThreadInfo() failed!\n");
- ok(gti.flags & GUI_INMENUMODE, "Thread info incorrect (flags=%08X)!\n", gti.flags);
+ ok(gti.flags & GUI_INMENUMODE, "Thread info incorrect (flags=%08lX)!\n", gti.flags);
}
/* verify that no capture change took place */
@@ -4309,11 +4309,11 @@ static void test_capture_4(void)
wclass.cbClsExtra = 0;
wclass.cbWndExtra = 0;
aclass = RegisterClassA( &wclass );
- ok( aclass, "RegisterClassA failed with error %d\n", GetLastError());
+ ok( aclass, "RegisterClassA failed with error %ld\n", GetLastError());
hwnd = CreateWindowA( wclass.lpszClassName, "MenuTest",
WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0,
400, 200, NULL, NULL, hInstance, NULL);
- ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
+ ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
if (!hwnd) return;
hmenu = CreatePopupMenu();
@@ -4483,7 +4483,7 @@ static void test_mouse_input(HWND hwnd)
{
ok(msg.hwnd == popup && msg.message == WM_MOUSEMOVE, "hwnd %p message %04x\n",
msg.hwnd, msg.message);
- ok(msg.pt.x == x && msg.pt.y == y, "wrong message coords (%d,%d)/(%d,%d)\n",
+ ok(msg.pt.x == x && msg.pt.y == y, "wrong message coords (%d,%d)/(%ld,%ld)\n",
x, y, msg.pt.x, msg.pt.y);
}
@@ -4628,7 +4628,7 @@ static void test_mouse_input(HWND hwnd)
}
ok(msg.hwnd == child && msg.message == WM_NCLBUTTONDOWN, "hwnd %p/%p message %04x\n",
msg.hwnd, child, msg.message);
- ok(msg.wParam == HTSYSMENU, "wparam %ld\n", msg.wParam);
+ ok(msg.wParam == HTSYSMENU, "wparam %Id\n", msg.wParam);
ret = wait_for_message( &msg );
ok(ret, "no message available\n");
@@ -4641,7 +4641,7 @@ static void test_mouse_input(HWND hwnd)
ok(ret, "no message available\n");
ok(msg.hwnd == child && msg.message == WM_LBUTTONDBLCLK, "hwnd %p/%p message %04x\n",
msg.hwnd, child, msg.message);
- ok(msg.wParam == MK_LBUTTON, "wparam %ld\n", msg.wParam);
+ ok(msg.wParam == MK_LBUTTON, "wparam %Id\n", msg.wParam);
ret = wait_for_message( &msg );
ok(ret, "no message available\n");
@@ -4713,7 +4713,7 @@ static void nccalchelper(HWND hwnd, INT x, INT y, RECT *prc)
GetWindowRect( hwnd, prc);
rc = *prc;
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)prc);
- ok(!ret, "got %08lx\n", ret);
+ ok(!ret, "got %08Ix\n", ret);
if (winetest_debug > 1)
trace("window rect is %s, nccalc rect is %s\n", wine_dbgstr_rect(&rc), wine_dbgstr_rect(prc));
}
@@ -4953,17 +4953,17 @@ static LRESULT WINAPI cbt_proc(int ncode, WPARAM wparam, LPARAM lparam)
ts = c->lpcs->lpCreateParams;
ok(ts != NULL, "lpCreateParams not set\n");
- ok(c->lpcs->style == ts->cs_style, "style = 0x%08x, expected 0x%08x\n",
+ ok(c->lpcs->style == ts->cs_style, "style = 0x%08lx, expected 0x%08lx\n",
c->lpcs->style, ts->cs_style);
- ok(c->lpcs->dwExStyle == ts->cs_exstyle, "exstyle = 0x%08x, expected 0x%08x\n",
+ ok(c->lpcs->dwExStyle == ts->cs_exstyle, "exstyle = 0x%08lx, expected 0x%08lx\n",
c->lpcs->dwExStyle, ts->cs_exstyle);
style = GetWindowLongW(hwnd, GWL_STYLE);
- ok(style == ts->cs_style, "style = 0x%08x, expected 0x%08x\n",
+ ok(style == ts->cs_style, "style = 0x%08lx, expected 0x%08lx\n",
style, ts->cs_style);
style = GetWindowLongW(hwnd, GWL_EXSTYLE);
ok(style == (ts->cs_exstyle & ~WS_EX_LAYERED),
- "exstyle = 0x%08x, expected 0x%08x\n", style, ts->cs_exstyle);
+ "exstyle = 0x%08lx, expected 0x%08lx\n", style, ts->cs_exstyle);
return CallNextHookEx(NULL, ncode, wparam, lparam);
}
@@ -4981,16 +4981,16 @@ static LRESULT WINAPI StyleCheckProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM
ts = cs->lpCreateParams;
ok(ts != NULL, "lpCreateParams not set\n");
- ok(cs->style == ts->cs_style, "style = 0x%08x, expected 0x%08x\n",
+ ok(cs->style == ts->cs_style, "style = 0x%08lx, expected 0x%08lx\n",
cs->style, ts->cs_style);
- ok(cs->dwExStyle == ts->cs_exstyle, "exstyle = 0x%08x, expected 0x%08x\n",
+ ok(cs->dwExStyle == ts->cs_exstyle, "exstyle = 0x%08lx, expected 0x%08lx\n",
cs->dwExStyle, ts->cs_exstyle);
style = GetWindowLongW(hwnd, GWL_STYLE);
- ok(style == ts->style, "style = 0x%08x, expected 0x%08x\n",
+ ok(style == ts->style, "style = 0x%08lx, expected 0x%08lx\n",
style, ts->style);
style = GetWindowLongW(hwnd, GWL_EXSTYLE);
- ok(style == ts->exstyle, "exstyle = 0x%08x, expected 0x%08x\n",
+ ok(style == ts->exstyle, "exstyle = 0x%08lx, expected 0x%08lx\n",
style, ts->exstyle);
break;
}
@@ -5056,8 +5056,8 @@ static void check_window_style(DWORD dwStyleIn, DWORD dwExStyleIn, DWORD dwStyle
dwActualStyle = GetWindowLongA(hwnd, GWL_STYLE);
dwActualExStyle = GetWindowLongA(hwnd, GWL_EXSTYLE);
- ok(dwActualStyle == dwStyleOut, "expected style %#x, got %#x\n", dwStyleOut, dwActualStyle);
- ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#x, got %#x\n", dwExStyleOut, dwActualExStyle);
+ ok(dwActualStyle == dwStyleOut, "expected style %#lx, got %#lx\n", dwStyleOut, dwActualStyle);
+ ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#lx, got %#lx\n", dwExStyleOut, dwActualExStyle);
/* try setting the styles explicitly */
SetWindowLongA( hwnd, GWL_EXSTYLE, dwExStyleIn );
@@ -5070,8 +5070,8 @@ static void check_window_style(DWORD dwStyleIn, DWORD dwExStyleIn, DWORD dwStyle
dwExStyleOut = dwExStyleIn | WS_EX_WINDOWEDGE;
else
dwExStyleOut = dwExStyleIn & ~WS_EX_WINDOWEDGE;
- ok(dwActualStyle == dwStyleOut, "expected style %#x, got %#x\n", dwStyleOut, dwActualStyle);
- ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#x, got %#x\n", dwExStyleOut, dwActualExStyle);
+ ok(dwActualStyle == dwStyleOut, "expected style %#lx, got %#lx\n", dwStyleOut, dwActualStyle);
+ ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#lx, got %#lx\n", dwExStyleOut, dwActualExStyle);
SetWindowLongA( hwnd, GWL_STYLE, dwStyleIn );
dwActualStyle = GetWindowLongA(hwnd, GWL_STYLE);
@@ -5086,8 +5086,8 @@ static void check_window_style(DWORD dwStyleIn, DWORD dwExStyleIn, DWORD dwStyle
dwExStyleOut = dwExStyleIn | WS_EX_WINDOWEDGE;
else
dwExStyleOut = dwExStyleIn & ~WS_EX_WINDOWEDGE;
- ok(dwActualStyle == dwStyleOut, "expected style %#x, got %#x\n", dwStyleOut, dwActualStyle);
- ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#x, got %#x\n", dwExStyleOut, dwActualExStyle);
+ ok(dwActualStyle == dwStyleOut, "expected style %#lx, got %#lx\n", dwStyleOut, dwActualStyle);
+ ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#lx, got %#lx\n", dwExStyleOut, dwActualExStyle);
DestroyWindow(hwnd);
if (hwndParent) DestroyWindow(hwndParent);
@@ -5150,7 +5150,7 @@ static void test_window_styles(void)
if ((tests[i].exstyle_in & WS_EX_LAYERED) && !pGetLayeredWindowAttributes)
continue;
- winetest_push_context("style %#x exstyle %#x", tests[i].style_in, tests[i].exstyle_in);
+ winetest_push_context("style %#lx exstyle %#lx", tests[i].style_in, tests[i].exstyle_in);
check_window_style(tests[i].style_in, tests[i].exstyle_in, tests[i].style_out, tests[i].exstyle_out);
winetest_pop_context();
}
@@ -5189,40 +5189,40 @@ static INT_PTR WINAPI empty_dlg_proc2(HWND hwnd, UINT msg, WPARAM wparam, LPARAM
ok(IsWindowEnabled(hwnd), "wrong state for %p\n", hwnd);
if (parent_is_child)
{
- ok(IsWindowEnabled(param->parent), "wrong state for %08x\n", style);
+ ok(IsWindowEnabled(param->parent), "wrong state for %08lx\n", style);
disabled_hwnd = param->grand_parent;
}
else
{
- ok(!IsWindowEnabled(param->parent), "wrong state for %08x\n", style);
+ ok(!IsWindowEnabled(param->parent), "wrong state for %08lx\n", style);
disabled_hwnd = param->parent;
}
if (param->grand_parent)
{
if (parent_is_child)
- ok(!IsWindowEnabled(param->grand_parent), "wrong state for %08x\n", style);
+ ok(!IsWindowEnabled(param->grand_parent), "wrong state for %08lx\n", style);
else
- ok(IsWindowEnabled(param->grand_parent), "wrong state for %08x\n", style);
+ ok(IsWindowEnabled(param->grand_parent), "wrong state for %08lx\n", style);
}
DialogBoxIndirectParamA(GetModuleHandleA(NULL), param->dlg_data, disabled_hwnd, empty_dlg_proc3, 0);
- ok(IsWindowEnabled(disabled_hwnd), "wrong state for %08x\n", style);
+ ok(IsWindowEnabled(disabled_hwnd), "wrong state for %08lx\n", style);
ok(IsWindowEnabled(hwnd), "wrong state for %p\n", hwnd);
ok(IsWindowEnabled(param->parent), "wrong state for %p\n", param->parent);
if (param->grand_parent)
- ok(IsWindowEnabled(param->grand_parent), "wrong state for %p (%08x)\n", param->grand_parent, style);
+ ok(IsWindowEnabled(param->grand_parent), "wrong state for %p (%08lx)\n", param->grand_parent, style);
DialogBoxIndirectParamA(GetModuleHandleA(NULL), param->dlg_data, hwnd, empty_dlg_proc3, 0);
ok(IsWindowEnabled(hwnd), "wrong state for %p\n", hwnd);
ok(IsWindowEnabled(param->parent), "wrong state for %p\n", param->parent);
if (param->grand_parent)
- ok(IsWindowEnabled(param->grand_parent), "wrong state for %p (%08x)\n", param->grand_parent, style);
+ ok(IsWindowEnabled(param->grand_parent), "wrong state for %p (%08lx)\n", param->grand_parent, style);
param->dlg_data->style |= WS_CHILD;
DialogBoxIndirectParamA(GetModuleHandleA(NULL), param->dlg_data, hwnd, empty_dlg_proc3, 0);
- ok(IsWindowEnabled(hwnd), "wrong state for %p (%08x)\n", hwnd, style);
+ ok(IsWindowEnabled(hwnd), "wrong state for %p (%08lx)\n", hwnd, style);
EndDialog(hwnd, 0);
}
@@ -5252,7 +5252,7 @@ static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_ou
parent = CreateWindowExA(0, "static", NULL, style_in,
0, 0, 0, 0, grand_parent, NULL, NULL, NULL);
- ok(parent != 0, "parent creation failed, style %#x\n", style_in);
+ ok(parent != 0, "parent creation failed, style %#lx\n", style_in);
dlg_data.dt.style = style_in;
dlg_data.dt.dwExtendedStyle = ex_style_in;
@@ -5267,22 +5267,22 @@ static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_ou
dlg_data.caption[0] = 0;
hwnd = CreateDialogIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, parent, empty_dlg_proc, 0);
- ok(hwnd != 0, "dialog creation failed, style %#x, exstyle %#x\n", style_in, ex_style_in);
+ ok(hwnd != 0, "dialog creation failed, style %#lx, exstyle %#lx\n", style_in, ex_style_in);
flush_events( TRUE );
style = GetWindowLongA(hwnd, GWL_STYLE);
ex_style = GetWindowLongA(hwnd, GWL_EXSTYLE);
- ok(style == (style_out | DS_3DLOOK), "got %#x\n", style);
- ok(ex_style == ex_style_out, "expected ex_style %#x, got %#x\n", ex_style_out, ex_style);
+ ok(style == (style_out | DS_3DLOOK), "got %#lx\n", style);
+ ok(ex_style == ex_style_out, "expected ex_style %#lx, got %#lx\n", ex_style_out, ex_style);
- ok(IsWindowEnabled(parent), "wrong parent state (dialog style %#x)\n", style_in);
+ ok(IsWindowEnabled(parent), "wrong parent state (dialog style %#lx)\n", style_in);
/* try setting the styles explicitly */
SetWindowLongA(hwnd, GWL_EXSTYLE, ex_style_in);
style = GetWindowLongA(hwnd, GWL_STYLE);
ex_style = GetWindowLongA(hwnd, GWL_EXSTYLE);
- ok(style == (style_out | DS_3DLOOK), "got %#x\n", style);
+ ok(style == (style_out | DS_3DLOOK), "got %#lx\n", style);
/* WS_EX_WINDOWEDGE can't always be changed */
if (ex_style_in & WS_EX_DLGMODALFRAME)
ex_style_out = ex_style_in | WS_EX_WINDOWEDGE;
@@ -5290,7 +5290,7 @@ static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_ou
ex_style_out = ex_style_in | WS_EX_WINDOWEDGE;
else
ex_style_out = ex_style_in & ~WS_EX_WINDOWEDGE;
- ok(ex_style == ex_style_out, "expected ex_style %#x, got %#x\n", ex_style_out, ex_style);
+ ok(ex_style == ex_style_out, "expected ex_style %#lx, got %#lx\n", ex_style_out, ex_style);
SetWindowLongA(hwnd, GWL_STYLE, style_in);
style = GetWindowLongA(hwnd, GWL_STYLE);
@@ -5298,7 +5298,7 @@ static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_ou
/* WS_CLIPSIBLINGS can't be reset on top-level windows */
if ((style_in & (WS_CHILD | WS_POPUP)) == WS_CHILD) style_out = style_in;
else style_out = style_in | WS_CLIPSIBLINGS;
- ok(style == style_out, "expected style %#x, got %#x\n", style_out, style);
+ ok(style == style_out, "expected style %#lx, got %#lx\n", style_out, style);
/* WS_EX_WINDOWEDGE can't always be changed */
if (ex_style_in & WS_EX_DLGMODALFRAME)
ex_style_out = ex_style_in | WS_EX_WINDOWEDGE;
@@ -5306,7 +5306,7 @@ static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_ou
ex_style_out = ex_style_in | WS_EX_WINDOWEDGE;
else
ex_style_out = ex_style_in & ~WS_EX_WINDOWEDGE;
- ok(ex_style == ex_style_out, "expected ex_style %#x, got %#x\n", ex_style_out, ex_style);
+ ok(ex_style == ex_style_out, "expected ex_style %#lx, got %#lx\n", ex_style_out, ex_style);
DestroyWindow(hwnd);
@@ -5315,9 +5315,9 @@ static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_ou
param.dlg_data = &dlg_data.dt;
DialogBoxIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, parent, empty_dlg_proc2, (LPARAM)¶m);
- ok(IsWindowEnabled(parent), "wrong parent state (dialog style %#x)\n", style_in);
+ ok(IsWindowEnabled(parent), "wrong parent state (dialog style %#lx)\n", style_in);
if (grand_parent)
- ok(IsWindowEnabled(grand_parent), "wrong grand parent state (dialog style %#x)\n", style_in);
+ ok(IsWindowEnabled(grand_parent), "wrong grand parent state (dialog style %#lx)\n", style_in);
DestroyWindow(parent);
DestroyWindow(grand_parent);
@@ -5546,7 +5546,7 @@ static void test_dialog_parent(void)
param.root = parent;
param.ga_root_owner = child;
ret = DialogBoxIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, child2, parent_dlg_proc, (LPARAM)¶m);
- ok(ret == 2, "DialogBoxIndirectParam returned %ld\n", ret);
+ ok(ret == 2, "DialogBoxIndirectParam returned %Id\n", ret);
/* Dialogs without WS_CHILD behave as expected, they use passed owner just like CreateWindow does. */
dlg_data.dt.style = WS_OVERLAPPEDWINDOW;
@@ -5567,7 +5567,7 @@ static void test_dialog_parent(void)
param.owner = child;
param.root = param.ga_root_owner = NULL;
ret = DialogBoxIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, child2, parent_dlg_proc, (LPARAM)¶m);
- ok(ret == 2, "DialogBoxIndirectParam returned %ld\n", ret);
+ ok(ret == 2, "DialogBoxIndirectParam returned %Id\n", ret);
other = CreateWindowExA(0, "static", NULL, WS_OVERLAPPEDWINDOW, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
SetWindowLongPtrA(child, GWLP_WNDPROC, (ULONG_PTR)reparent_dialog_owner_proc);
@@ -5591,7 +5591,7 @@ static void test_dialog_parent(void)
param.root = NULL;
param.ga_root_owner = child;
ret = DialogBoxIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, child2, parent_dlg_proc, (LPARAM)¶m);
- ok(ret == 2, "DialogBoxIndirectParam returned %ld\n", ret);
+ ok(ret == 2, "DialogBoxIndirectParam returned %Id\n", ret);
/* If we change parent in WM_INITDIALOG for WS_CHILD dialog WM_ENTERIDLE is still sent to the original
* parent. EndDialog will enable the new parent. */
@@ -5599,7 +5599,7 @@ static void test_dialog_parent(void)
EnableWindow(other, FALSE);
dlg_data.dt.style = WS_CHILD;
ret = DialogBoxIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, child2, reparent_dlg_proc, (LPARAM)other);
- ok(ret == 2, "DialogBoxIndirectParam returned %ld\n", ret);
+ ok(ret == 2, "DialogBoxIndirectParam returned %Id\n", ret);
ok(!IsWindowEnabled(other), "other is not disabled\n");
ok(!IsWindowEnabled(child), "child is not disabled\n");
ok(IsWindowEnabled(child2), "child2 is not enabled\n");
@@ -5611,7 +5611,7 @@ static void test_dialog_parent(void)
EnableWindow(other, FALSE);
dlg_data.dt.style = WS_OVERLAPPED;
ret = DialogBoxIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, child2, reparent_owned_dlg_proc, (LPARAM)other);
- ok(ret == 1, "DialogBoxIndirectParam returned %ld\n", ret);
+ ok(ret == 1, "DialogBoxIndirectParam returned %Id\n", ret);
ok(!IsWindowEnabled(other), "other is not disabled\n");
ok(!IsWindowEnabled(child), "child is not disabled\n");
ok(IsWindowEnabled(child2), "child2 is not enabled\n");
@@ -5621,14 +5621,14 @@ static void test_dialog_parent(void)
/* Quit dialog message loop by sending WM_QUIT message. Dialog owner is not enabled. */
SetWindowLongPtrA(child, GWLP_WNDPROC, (ULONG_PTR)post_quit_dialog_owner_proc);
ret = DialogBoxIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, other, empty_dlg_proc, 0);
- ok(ret == 1, "DialogBoxIndirectParam returned %ld\n", ret);
+ ok(ret == 1, "DialogBoxIndirectParam returned %Id\n", ret);
ok(!IsWindowEnabled(other), "other is enabled\n");
EnableWindow(other, TRUE);
/* Quit dialog message loop by destroying the window. Dialog owner is not enabled. */
SetWindowLongPtrA(child, GWLP_WNDPROC, (ULONG_PTR)destroy_dialog_owner_proc);
ret = DialogBoxIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, other, empty_dlg_proc, 0);
- ok(ret == 1, "DialogBoxIndirectParam returned %ld\n", ret);
+ ok(ret == 1, "DialogBoxIndirectParam returned %Id\n", ret);
ok(!IsWindowEnabled(other), "other is enabled\n");
EnableWindow(other, TRUE);
@@ -5663,7 +5663,7 @@ static void test_scrollwindow( HWND hwnd)
flush_events(FALSE);
/* expected: black should have scrolled to the upper half */
colr = GetPixel( hdc, (rc2.left+rc2.right)/ 2, rc2.bottom / 4 );
- ok ( colr == 0, "pixel should be black, color is %08x\n", colr);
+ ok ( colr == 0, "pixel should be black, color is %08lx\n", colr);
/* Repeat that test of ScrollWindow(Ex) now with clip rectangle */
/* paint the lower half of the window black */
rc2 = rc;
@@ -5683,7 +5683,7 @@ static void test_scrollwindow( HWND hwnd)
flush_events(FALSE);
/* expected: black should have scrolled to the upper half */
colr = GetPixel( hdc, (rc2.left+rc2.right)/ 2, rc2.bottom / 4 );
- ok ( colr == 0, "pixel should be black, color is %08x\n", colr);
+ ok ( colr == 0, "pixel should be black, color is %08lx\n", colr);
/* clean up */
ReleaseDC( hwnd, hdc);
@@ -5914,11 +5914,11 @@ 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 %08x\n", colr);
+ ok ( colr == 0, "pixel should be black, color is %08lx\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 %08x\n", colr);
+ ok ( colr == 0, "pixel should be black, color is %08lx\n", colr);
/* test with NULL clip rect */
ScrollDC( hdc, 20, -20, &rc, NULL, hrgn, &rcu);
/*FillRgn(hdc, hrgn, GetStockObject(WHITE_BRUSH));*/
@@ -5971,7 +5971,7 @@ static void test_params(void)
/* Just a param check */
SetLastError(0xdeadbeef);
rc = GetWindowTextA(hwndMain2, NULL, 1024);
- ok(!rc, "GetWindowText: rc=%d err=%d\n",rc,GetLastError());
+ ok(!rc, "GetWindowText: rc=%d err=%ld\n",rc,GetLastError());
SetLastError(0xdeadbeef);
hwnd=CreateWindowA("LISTBOX", "TestList",
@@ -5983,7 +5983,7 @@ static void test_params(void)
"CreateWindow with invalid menu handle should fail\n");
if (!hwnd)
ok(GetLastError() == ERROR_INVALID_MENU_HANDLE,
- "wrong last error value %d\n", GetLastError());
+ "wrong last error value %ld\n", GetLastError());
}
static void test_AWRwindow(LPCSTR class, LONG style, LONG exStyle, BOOL menu)
@@ -5996,7 +5996,7 @@ static void test_AWRwindow(LPCSTR class, LONG style, LONG exStyle, BOOL menu)
0,
menu ? hmenu : 0,
0, 0);
- ok(hwnd != NULL, "Failed to create window class=%s, style=0x%08x, exStyle=0x%08x\n", class, style, exStyle);
+ ok(hwnd != NULL, "Failed to create window class=%s, style=0x%08lx, exStyle=0x%08lx\n", class, style, exStyle);
ShowWindow(hwnd, SW_SHOW);
@@ -6080,7 +6080,7 @@ static void test_AWR_flags(void)
rect2 = rect;
AdjustWindowRectEx( &rect, style, FALSE, exstyle );
wine_AdjustWindowRectEx( &rect2, style, FALSE, exstyle );
- ok( EqualRect( &rect, &rect2 ), "%08x %08x rects do not match: win %s wine %s\n",
+ ok( EqualRect( &rect, &rect2 ), "%08lx %08lx rects do not match: win %s wine %s\n",
style, exstyle, wine_dbgstr_rect( &rect ), wine_dbgstr_rect( &rect2 ));
if (pAdjustWindowRectExForDpi)
{
@@ -6088,7 +6088,7 @@ static void test_AWR_flags(void)
rect2 = rect;
pAdjustWindowRectExForDpi( &rect, style, FALSE, exstyle, 192 );
wine_AdjustWindowRectExForDpi( &rect2, style, FALSE, exstyle, 192 );
- ok( EqualRect( &rect, &rect2 ), "%08x %08x rects do not match: win %s wine %s\n",
+ ok( EqualRect( &rect, &rect2 ), "%08lx %08lx rects do not match: win %s wine %s\n",
style, exstyle, wine_dbgstr_rect( &rect ), wine_dbgstr_rect( &rect2 ));
}
}
@@ -6238,7 +6238,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 %d, got %d\n", \
+ ": expected %ld, got %ld\n", \
t.w.r.f, got.w.r.f)
#define parentdc_todo_field_ok(t, w, r, f, got) \
@@ -6611,7 +6611,7 @@ static LRESULT CALLBACK winsizes_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM
ok( EqualRect( &rect, r ), "passed rect %s doesn't match window rect %s\n",
wine_dbgstr_rect( r ), wine_dbgstr_rect( &rect ));
ret = DefWindowProcA(hwnd, msg, wp, lp);
- ok(!ret, "got %08lx\n", ret);
+ ok(!ret, "got %08Ix\n", ret);
return ret;
}
default:
@@ -6632,13 +6632,13 @@ static void test_CreateWindow(void)
#define expect_menu(window, menu) \
SetLastError(0xdeadbeef); \
res = (GetMenu(window) == (HMENU)menu); \
- ok(res, "GetMenu error %d\n", GetLastError())
+ ok(res, "GetMenu error %ld\n", GetLastError())
#define expect_style(window, style)\
- ok((ULONG)GetWindowLongA(window, GWL_STYLE) == (style), "expected style %x != %x\n", (LONG)(style), GetWindowLongA(window, GWL_STYLE))
+ ok((ULONG)GetWindowLongA(window, GWL_STYLE) == (style), "expected style %lx != %lx\n", (LONG)(style), GetWindowLongA(window, GWL_STYLE))
#define expect_ex_style(window, ex_style)\
- ok((ULONG)GetWindowLongA(window, GWL_EXSTYLE) == (ex_style), "expected ex_style %x != %x\n", (LONG)(ex_style), GetWindowLongA(window, GWL_EXSTYLE))
+ ok((ULONG)GetWindowLongA(window, GWL_EXSTYLE) == (ex_style), "expected ex_style %lx != %lx\n", (LONG)(ex_style), GetWindowLongA(window, GWL_EXSTYLE))
hmenu = CreateMenu();
assert(hmenu != 0);
@@ -6647,13 +6647,13 @@ static void test_CreateWindow(void)
SetLastError(0xdeadbeef);
res = IsMenu(hmenu);
- ok(res, "IsMenu error %d\n", GetLastError());
+ ok(res, "IsMenu error %ld\n", GetLastError());
/* WS_CHILD */
SetLastError(0xdeadbeef);
hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_CHILD,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
- ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
+ ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError());
expect_menu(hwnd, 1);
expect_style(hwnd, WS_CHILD);
expect_ex_style(hwnd, WS_EX_APPWINDOW);
@@ -6662,7 +6662,7 @@ static void test_CreateWindow(void)
SetLastError(0xdeadbeef);
hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_CAPTION,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
- ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
+ ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError());
expect_menu(hwnd, 1);
expect_style(hwnd, WS_CHILD | WS_CAPTION);
expect_ex_style(hwnd, WS_EX_APPWINDOW | WS_EX_WINDOWEDGE);
@@ -6671,7 +6671,7 @@ static void test_CreateWindow(void)
SetLastError(0xdeadbeef);
hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
- ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
+ ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError());
expect_menu(hwnd, 1);
expect_style(hwnd, WS_CHILD);
expect_ex_style(hwnd, 0);
@@ -6680,7 +6680,7 @@ static void test_CreateWindow(void)
SetLastError(0xdeadbeef);
hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD | WS_CAPTION,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
- ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
+ ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError());
expect_menu(hwnd, 1);
expect_style(hwnd, WS_CHILD | WS_CAPTION);
expect_ex_style(hwnd, WS_EX_WINDOWEDGE);
@@ -6690,63 +6690,63 @@ static void test_CreateWindow(void)
SetLastError(0xdeadbeef);
hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_POPUP,
0, 0, 100, 100, parent, hmenu, 0, NULL);
- ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
+ ok(hwnd != 0, "CreateWindowEx error %ld\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 %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
hmenu = CreateMenu();
assert(hmenu != 0);
SetLastError(0xdeadbeef);
hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_POPUP | WS_CAPTION,
0, 0, 100, 100, parent, hmenu, 0, NULL);
- ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
+ ok(hwnd != 0, "CreateWindowEx error %ld\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 %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
hmenu = CreateMenu();
assert(hmenu != 0);
SetLastError(0xdeadbeef);
hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP,
0, 0, 100, 100, parent, hmenu, 0, NULL);
- ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
+ ok(hwnd != 0, "CreateWindowEx error %ld\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 %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
hmenu = CreateMenu();
assert(hmenu != 0);
SetLastError(0xdeadbeef);
hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_CAPTION,
0, 0, 100, 100, parent, hmenu, 0, NULL);
- ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
+ ok(hwnd != 0, "CreateWindowEx error %ld\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 %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
/* WS_CHILD | WS_POPUP */
SetLastError(0xdeadbeef);
hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
ok(!hwnd, "CreateWindowEx should fail\n");
- ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
if (hwnd)
DestroyWindow(hwnd);
@@ -6755,20 +6755,20 @@ static void test_CreateWindow(void)
SetLastError(0xdeadbeef);
hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP,
0, 0, 100, 100, parent, hmenu, 0, NULL);
- ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
+ ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError());
expect_menu(hwnd, hmenu);
expect_style(hwnd, WS_CHILD | 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 %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
SetLastError(0xdeadbeef);
hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
ok(!hwnd, "CreateWindowEx should fail\n");
- ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
if (hwnd)
DestroyWindow(hwnd);
@@ -6777,20 +6777,20 @@ static void test_CreateWindow(void)
SetLastError(0xdeadbeef);
hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION,
0, 0, 100, 100, parent, hmenu, 0, NULL);
- ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
+ ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError());
expect_menu(hwnd, hmenu);
expect_style(hwnd, WS_CHILD | 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 %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
SetLastError(0xdeadbeef);
hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD | WS_POPUP,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
ok(!hwnd, "CreateWindowEx should fail\n");
- ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
if (hwnd)
DestroyWindow(hwnd);
@@ -6799,20 +6799,20 @@ static void test_CreateWindow(void)
SetLastError(0xdeadbeef);
hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD | WS_POPUP,
0, 0, 100, 100, parent, hmenu, 0, NULL);
- ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
+ ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError());
expect_menu(hwnd, hmenu);
expect_style(hwnd, WS_CHILD | 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 %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
SetLastError(0xdeadbeef);
hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
ok(!hwnd, "CreateWindowEx should fail\n");
- ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
if (hwnd)
DestroyWindow(hwnd);
@@ -6821,14 +6821,14 @@ static void test_CreateWindow(void)
SetLastError(0xdeadbeef);
hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION,
0, 0, 100, 100, parent, hmenu, 0, NULL);
- ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
+ ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError());
expect_menu(hwnd, hmenu);
expect_style(hwnd, WS_CHILD | 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 %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
/* test child window sizing */
cls.style = 0;
@@ -6846,7 +6846,7 @@ static void test_CreateWindow(void)
SetLastError(0xdeadbeef);
parent = CreateWindowExA(0, "MinMax_WndClass", NULL, WS_CAPTION | WS_SYSMENU | WS_THICKFRAME,
0, 0, 100, 100, 0, 0, 0, NULL);
- ok(parent != 0, "CreateWindowEx error %d\n", GetLastError());
+ ok(parent != 0, "CreateWindowEx error %ld\n", GetLastError());
expect_menu(parent, 0);
expect_style(parent, WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_CLIPSIBLINGS);
expect_ex_style(parent, WS_EX_WINDOWEDGE);
@@ -6869,7 +6869,7 @@ static void test_CreateWindow(void)
hwnd = CreateWindowExA(0, "MinMax_WndClass", NULL, WS_CHILD | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME,
rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top,
parent, (HMENU)1, 0, NULL);
- ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
+ ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError());
expect_menu(hwnd, 1);
expect_style(hwnd, WS_CHILD | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME);
expect_ex_style(hwnd, WS_EX_WINDOWEDGE);
@@ -6892,49 +6892,49 @@ static void test_CreateWindow(void)
SetRect( &expected_rect, 0, 0, 200000, 200000 );
broken_rect = expected_rect;
hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, 300000, 300000, 200000, 200000, parent, 0, 0, NULL);
- ok( hwnd != 0, "creation failed err %u\n", GetLastError());
+ ok( hwnd != 0, "creation failed err %lu\n", GetLastError());
GetClientRect( hwnd, &rc );
ok( rc.right == 200000 || rc.right == 65535 || broken(rc.right == (short)200000),
- "invalid rect right %u\n", rc.right );
+ "invalid rect right %lu\n", rc.right );
ok( rc.bottom == 200000 || rc.bottom == 65535 || broken(rc.bottom == (short)200000),
- "invalid rect bottom %u\n", rc.bottom );
+ "invalid rect bottom %lu\n", rc.bottom );
DestroyWindow(hwnd);
expected_cx = expected_cy = -10;
SetRectEmpty(&expected_rect);
SetRect( &broken_rect, 0, 0, -10, -10 );
hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, -20, -20, -10, -10, parent, 0, 0, NULL);
- ok( hwnd != 0, "creation failed err %u\n", GetLastError());
+ ok( hwnd != 0, "creation failed err %lu\n", GetLastError());
GetClientRect( hwnd, &rc );
- ok( rc.right == 0, "invalid rect right %u\n", rc.right );
- ok( rc.bottom == 0, "invalid rect bottom %u\n", rc.bottom );
+ ok( rc.right == 0, "invalid rect right %lu\n", rc.right );
+ ok( rc.bottom == 0, "invalid rect bottom %lu\n", rc.bottom );
DestroyWindow(hwnd);
expected_cx = expected_cy = -200000;
SetRectEmpty(&expected_rect);
SetRect( &broken_rect, 0, 0, -200000, -200000 );
hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, -300000, -300000, -200000, -200000, parent, 0, 0, NULL);
- ok( hwnd != 0, "creation failed err %u\n", GetLastError());
+ ok( hwnd != 0, "creation failed err %lu\n", GetLastError());
GetClientRect( hwnd, &rc );
- ok( rc.right == 0, "invalid rect right %u\n", rc.right );
- ok( rc.bottom == 0, "invalid rect bottom %u\n", rc.bottom );
+ ok( rc.right == 0, "invalid rect right %lu\n", rc.right );
+ ok( rc.bottom == 0, "invalid rect bottom %lu\n", rc.bottom );
DestroyWindow(hwnd);
/* we need a parent at 0,0 so that child coordinates match */
DestroyWindow(parent);
parent = CreateWindowExA(0, "MinMax_WndClass", NULL, WS_POPUP, 0, 0, 100, 100, 0, 0, 0, NULL);
- ok(parent != 0, "CreateWindowEx error %d\n", GetLastError());
+ ok(parent != 0, "CreateWindowEx error %ld\n", GetLastError());
expected_cx = 100;
expected_cy = 0x7fffffff;
SetRect( &expected_rect, 10, 10, 110, 0x7fffffff );
SetRect( &broken_rect, 10, 10, 110, 0x7fffffffU + 10 );
hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, 10, 10, 100, 0x7fffffff, parent, 0, 0, NULL);
- ok( hwnd != 0, "creation failed err %u\n", GetLastError());
+ ok( hwnd != 0, "creation failed err %lu\n", GetLastError());
GetClientRect( hwnd, &rc );
- ok( rc.right == 100, "invalid rect right %u\n", rc.right );
+ ok( rc.right == 100, "invalid rect right %lu\n", rc.right );
ok( rc.bottom == 0x7fffffff - 10 || rc.bottom ==65535 || broken(rc.bottom == 0),
- "invalid rect bottom %u\n", rc.bottom );
+ "invalid rect bottom %lu\n", rc.bottom );
DestroyWindow(hwnd);
expected_cx = 0x7fffffff;
@@ -6942,22 +6942,22 @@ static void test_CreateWindow(void)
SetRect( &expected_rect, 20, 10, 0x7fffffff, 0x7fffffff );
SetRect( &broken_rect, 20, 10, 0x7fffffffU + 20, 0x7fffffffU + 10 );
hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, 20, 10, 0x7fffffff, 0x7fffffff, parent, 0, 0, NULL);
- ok( hwnd != 0, "creation failed err %u\n", GetLastError());
+ ok( hwnd != 0, "creation failed err %lu\n", GetLastError());
GetClientRect( hwnd, &rc );
ok( rc.right == 0x7fffffff - 20 || rc.right == 65535 || broken(rc.right == 0),
- "invalid rect right %u\n", rc.right );
+ "invalid rect right %lu\n", rc.right );
ok( rc.bottom == 0x7fffffff - 10 || rc.right == 65535 || broken(rc.bottom == 0),
- "invalid rect bottom %u\n", rc.bottom );
+ "invalid rect bottom %lu\n", rc.bottom );
DestroyWindow(hwnd);
/* top level window */
expected_cx = expected_cy = 200000;
SetRect( &expected_rect, 0, 0, GetSystemMetrics(SM_CXMAXTRACK), GetSystemMetrics(SM_CYMAXTRACK) );
hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_OVERLAPPEDWINDOW, 300000, 300000, 200000, 200000, 0, 0, 0, NULL);
- ok( hwnd != 0, "creation failed err %u\n", GetLastError());
+ ok( hwnd != 0, "creation failed err %lu\n", GetLastError());
GetClientRect( hwnd, &rc );
- ok( rc.right <= expected_cx, "invalid rect right %u\n", rc.right );
- ok( rc.bottom <= expected_cy, "invalid rect bottom %u\n", rc.bottom );
+ ok( rc.right <= expected_cx, "invalid rect right %lu\n", rc.right );
+ ok( rc.bottom <= expected_cy, "invalid rect bottom %lu\n", rc.bottom );
DestroyWindow(hwnd);
/* invalid class */
@@ -6965,7 +6965,7 @@ static void test_CreateWindow(void)
hwnd = CreateWindowExA(0, "INVALID_CLASS", NULL, WS_CHILD, 10, 10, 100, 100, parent, 0, 0, NULL);
ok(hwnd == 0, "CreateWindowEx succeeded\n");
ok(GetLastError() == ERROR_CLASS_DOES_NOT_EXIST || GetLastError() == ERROR_CANNOT_FIND_WND_CLASS,
- "invalid error %u\n", GetLastError());
+ "invalid error %lu\n", GetLastError());
DestroyWindow(hwnd);
hdc = GetDC( parent );
@@ -6977,19 +6977,19 @@ static void test_CreateWindow(void)
SetLastError( 0xdeadbeef );
parent = CreateWindowExA(WS_EX_APPWINDOW | WS_EX_LAYOUTRTL, "static", NULL, WS_POPUP,
0, 0, 100, 100, 0, 0, 0, NULL);
- ok( parent != 0, "creation failed err %u\n", GetLastError());
+ ok( parent != 0, "creation failed err %lu\n", GetLastError());
expect_ex_style( parent, WS_EX_APPWINDOW | WS_EX_LAYOUTRTL );
hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD, 0, 0, 20, 20, parent, 0, 0, NULL);
- ok( hwnd != 0, "creation failed err %u\n", GetLastError());
+ ok( hwnd != 0, "creation failed err %lu\n", GetLastError());
expect_ex_style( hwnd, WS_EX_LAYOUTRTL );
DestroyWindow( hwnd );
hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, 0, 0, 20, 20, parent, 0, 0, NULL);
- ok( hwnd != 0, "creation failed err %u\n", GetLastError());
+ ok( hwnd != 0, "creation failed err %lu\n", GetLastError());
expect_ex_style( hwnd, 0 );
DestroyWindow( hwnd );
SetWindowLongW( parent, GWL_EXSTYLE, WS_EX_APPWINDOW | WS_EX_LAYOUTRTL | WS_EX_NOINHERITLAYOUT );
hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD, 0, 0, 20, 20, parent, 0, 0, NULL);
- ok( hwnd != 0, "creation failed err %u\n", GetLastError());
+ ok( hwnd != 0, "creation failed err %lu\n", GetLastError());
expect_ex_style( hwnd, 0 );
DestroyWindow( hwnd );
@@ -6999,31 +6999,31 @@ static void test_CreateWindow(void)
SetLastError( 0xdeadbeef );
ok( !pGetProcessDefaultLayout( NULL ), "GetProcessDefaultLayout succeeded\n" );
- ok( GetLastError() == ERROR_NOACCESS, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_NOACCESS, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
res = pGetProcessDefaultLayout( &layout );
- ok( res, "GetProcessDefaultLayout failed err %u\n", GetLastError ());
- ok( layout == 0, "GetProcessDefaultLayout wrong layout %x\n", layout );
+ ok( res, "GetProcessDefaultLayout failed err %lu\n", GetLastError ());
+ ok( layout == 0, "GetProcessDefaultLayout wrong layout %lx\n", layout );
SetLastError( 0xdeadbeef );
res = pSetProcessDefaultLayout( 7 );
- ok( res, "SetProcessDefaultLayout failed err %u\n", GetLastError ());
+ ok( res, "SetProcessDefaultLayout failed err %lu\n", GetLastError ());
res = pGetProcessDefaultLayout( &layout );
- ok( res, "GetProcessDefaultLayout failed err %u\n", GetLastError ());
- ok( layout == 7, "GetProcessDefaultLayout wrong layout %x\n", layout );
+ ok( res, "GetProcessDefaultLayout failed err %lu\n", GetLastError ());
+ ok( layout == 7, "GetProcessDefaultLayout wrong layout %lx\n", layout );
SetLastError( 0xdeadbeef );
res = pSetProcessDefaultLayout( LAYOUT_RTL );
- ok( res, "SetProcessDefaultLayout failed err %u\n", GetLastError ());
+ ok( res, "SetProcessDefaultLayout failed err %lu\n", GetLastError ());
res = pGetProcessDefaultLayout( &layout );
- ok( res, "GetProcessDefaultLayout failed err %u\n", GetLastError ());
- ok( layout == LAYOUT_RTL, "GetProcessDefaultLayout wrong layout %x\n", layout );
+ ok( res, "GetProcessDefaultLayout failed err %lu\n", GetLastError ());
+ ok( layout == LAYOUT_RTL, "GetProcessDefaultLayout wrong layout %lx\n", layout );
hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_POPUP,
0, 0, 100, 100, 0, 0, 0, NULL);
- ok( hwnd != 0, "creation failed err %u\n", GetLastError());
+ ok( hwnd != 0, "creation failed err %lu\n", GetLastError());
expect_ex_style( hwnd, WS_EX_APPWINDOW | WS_EX_LAYOUTRTL );
DestroyWindow( hwnd );
hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_POPUP,
0, 0, 100, 100, parent, 0, 0, NULL);
- ok( hwnd != 0, "creation failed err %u\n", GetLastError());
+ ok( hwnd != 0, "creation failed err %lu\n", GetLastError());
expect_ex_style( hwnd, WS_EX_APPWINDOW );
DestroyWindow( hwnd );
pSetProcessDefaultLayout( 0 );
@@ -7087,103 +7087,103 @@ static void test_set_window_long_size(void)
/* GWLP_USERDATA */
SetWindowLongPtrA(hwnd, GWLP_USERDATA, ((LONG_PTR)1 << 32) | 123);
ret = GetWindowLongA(hwnd, GWLP_USERDATA);
- ok(ret == 123, "Unexpected user data %#x.\n", ret);
+ ok(ret == 123, "Unexpected user data %#lx.\n", ret);
retval = GetWindowLongPtrA(hwnd, GWLP_USERDATA);
ok(retval > 123, "Unexpected user data.\n");
ret = GetWindowWord(hwnd, GWLP_USERDATA);
todo_wine
- ok(ret == 123, "Unexpected user data %#x.\n", ret);
+ ok(ret == 123, "Unexpected user data %#lx.\n", ret);
ret = SetWindowWord(hwnd, GWLP_USERDATA, 124);
todo_wine
- ok(ret == 123, "Unexpected user data %#x.\n", ret);
+ ok(ret == 123, "Unexpected user data %#lx.\n", ret);
ret = GetWindowLongA(hwnd, GWLP_USERDATA);
todo_wine
- ok(ret == 124, "Unexpected user data %#x.\n", ret);
+ ok(ret == 124, "Unexpected user data %#lx.\n", ret);
retval = GetWindowLongPtrA(hwnd, GWLP_USERDATA);
todo_wine
ok(retval == 124, "Unexpected user data.\n");
SetWindowLongA(hwnd, GWLP_USERDATA, (1 << 16) | 123);
ret = GetWindowLongA(hwnd, GWLP_USERDATA);
- ok(ret == ((1 << 16) | 123), "Unexpected user data %#x.\n", ret);
+ ok(ret == ((1 << 16) | 123), "Unexpected user data %#lx.\n", ret);
ret = GetWindowWord(hwnd, GWLP_USERDATA);
todo_wine
- ok(ret == 123, "Unexpected user data %#x.\n", ret);
+ ok(ret == 123, "Unexpected user data %#lx.\n", ret);
ret = SetWindowWord(hwnd, GWLP_USERDATA, 124);
todo_wine
- ok(ret == 123, "Unexpected user data %#x.\n", ret);
+ ok(ret == 123, "Unexpected user data %#lx.\n", ret);
ret = GetWindowLongA(hwnd, GWLP_USERDATA);
todo_wine
- ok(ret == ((1 << 16) | 124), "Unexpected user data %#x.\n", ret);
+ ok(ret == ((1 << 16) | 124), "Unexpected user data %#lx.\n", ret);
ret = GetWindowWord(hwnd, GWLP_USERDATA);
todo_wine
- ok(ret == 124, "Unexpected user data %#x.\n", ret);
+ ok(ret == 124, "Unexpected user data %#lx.\n", ret);
/* GWLP_ID */
ret = SetWindowLongA(hwnd, GWLP_ID, 1);
- ok(!ret, "Unexpected id %#x.\n", ret);
+ ok(!ret, "Unexpected id %#lx.\n", ret);
ret = GetWindowLongA(hwnd, GWLP_ID);
- ok(ret == 1, "Unexpected id %#x.\n", ret);
+ ok(ret == 1, "Unexpected id %#lx.\n", ret);
ret = GetWindowLongW(hwnd, GWLP_ID);
- ok(ret == 1, "Unexpected id %#x.\n", ret);
+ ok(ret == 1, "Unexpected id %#lx.\n", ret);
SetWindowLongPtrA(hwnd, GWLP_ID, ((LONG_PTR)1 << 32) | 123);
ret = GetWindowLongA(hwnd, GWLP_ID);
- ok(ret == 123, "Unexpected id %#x.\n", ret);
+ ok(ret == 123, "Unexpected id %#lx.\n", ret);
ret = GetWindowLongW(hwnd, GWLP_ID);
- ok(ret == 123, "Unexpected id %#x.\n", ret);
+ ok(ret == 123, "Unexpected id %#lx.\n", ret);
retval = GetWindowLongPtrA(hwnd, GWLP_ID);
ok(retval > 123, "Unexpected id.\n");
SetLastError(0xdeadbeef);
ret = GetWindowWord(hwnd, GWLP_ID);
todo_wine
- ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected id %#x.\n", ret);
+ ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected id %#lx.\n", ret);
/* GWLP_HINSTANCE */
retval = GetWindowLongPtrA(hwnd, GWLP_HINSTANCE);
- ok(retval == (LONG_PTR)GetModuleHandleA(NULL), "Unexpected instance %#lx.\n", retval);
+ ok(retval == (LONG_PTR)GetModuleHandleA(NULL), "Unexpected instance %#Ix.\n", retval);
SetLastError(0xdeadbeef);
ret = GetWindowLongA(hwnd, GWLP_HINSTANCE);
- ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#x.\n", ret);
+ ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#lx.\n", ret);
SetLastError(0xdeadbeef);
ret = GetWindowLongW(hwnd, GWLP_HINSTANCE);
- ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#x.\n", ret);
+ ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#lx.\n", ret);
SetLastError(0xdeadbeef);
ret = GetWindowWord(hwnd, GWLP_HINSTANCE);
todo_wine
- ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#x.\n", ret);
+ ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#lx.\n", ret);
SetLastError(0xdeadbeef);
ret = SetWindowLongA(hwnd, GWLP_HINSTANCE, 1);
- ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#x.\n", ret);
+ ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#lx.\n", ret);
SetLastError(0xdeadbeef);
ret = SetWindowLongW(hwnd, GWLP_HINSTANCE, 1);
- ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#x.\n", ret);
+ ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#lx.\n", ret);
/* GWLP_HWNDPARENT */
SetLastError(0xdeadbeef);
ret = GetWindowLongA(hwnd, GWLP_HWNDPARENT);
- ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#x.\n", ret);
+ ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#lx.\n", ret);
SetLastError(0xdeadbeef);
ret = SetWindowLongA(hwnd, GWLP_HWNDPARENT, 0);
- ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#x.\n", ret);
+ ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#lx.\n", ret);
SetLastError(0xdeadbeef);
ret = SetWindowLongW(hwnd, GWLP_HWNDPARENT, 0);
- ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#x.\n", ret);
+ ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#lx.\n", ret);
SetLastError(0xdeadbeef);
ret = GetWindowWord(hwnd, GWLP_HWNDPARENT);
todo_wine
- ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#x.\n", ret);
+ ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#lx.\n", ret);
DestroyWindow(hwnd);
#endif
@@ -7218,59 +7218,59 @@ static void test_set_window_word_size(void)
/* GWLP_USERDATA */
ret = SetWindowLongA(hwnd, GWLP_USERDATA, (1 << 16) | 123);
- ok(!ret, "Unexpected user data %#x.\n", ret);
+ ok(!ret, "Unexpected user data %#lx.\n", ret);
ret = GetWindowLongA(hwnd, GWLP_USERDATA);
- ok(ret > 123, "Unexpected user data %#x.\n", ret);
+ ok(ret > 123, "Unexpected user data %#lx.\n", ret);
ret = GetWindowWord(hwnd, GWLP_USERDATA);
todo_wine
- ok(ret == 123, "Unexpected user data %#x.\n", ret);
+ ok(ret == 123, "Unexpected user data %#lx.\n", ret);
ret = SetWindowWord(hwnd, GWLP_USERDATA, 124);
todo_wine
- ok(ret == 123, "Unexpected user data %#x.\n", ret);
+ ok(ret == 123, "Unexpected user data %#lx.\n", ret);
ret = GetWindowWord(hwnd, GWLP_USERDATA);
todo_wine
- ok(ret == 124, "Unexpected user data %#x.\n", ret);
+ ok(ret == 124, "Unexpected user data %#lx.\n", ret);
ret = GetWindowLongA(hwnd, GWLP_USERDATA);
todo_wine
- ok(ret == ((1 << 16) | 124), "Unexpected user data %#x.\n", ret);
+ ok(ret == ((1 << 16) | 124), "Unexpected user data %#lx.\n", ret);
/* GWLP_ID */
ret = SetWindowLongA(hwnd, GWLP_ID, 1);
- ok(!ret, "Unexpected id %#x.\n", ret);
+ ok(!ret, "Unexpected id %#lx.\n", ret);
ret = GetWindowLongA(hwnd, GWLP_ID);
- ok(ret == 1, "Unexpected id %#x.\n", ret);
+ ok(ret == 1, "Unexpected id %#lx.\n", ret);
SetLastError(0xdeadbeef);
ret = GetWindowWord(hwnd, GWLP_ID);
todo_wine
- ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected id %#x.\n", ret);
+ ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected id %#lx.\n", ret);
SetLastError(0xdeadbeef);
ret = SetWindowWord(hwnd, GWLP_ID, 2);
todo_wine
- ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected id %#x.\n", ret);
+ ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected id %#lx.\n", ret);
/* GWLP_HINSTANCE */
retval = GetWindowLongPtrA(hwnd, GWLP_HINSTANCE);
- ok(retval == (LONG_PTR)GetModuleHandleA(NULL), "Unexpected instance %#lx.\n", retval);
+ ok(retval == (LONG_PTR)GetModuleHandleA(NULL), "Unexpected instance %#Ix.\n", retval);
SetLastError(0xdeadbeef);
ret = GetWindowWord(hwnd, GWLP_HINSTANCE);
todo_wine
- ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#x.\n", ret);
+ ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#lx.\n", ret);
SetLastError(0xdeadbeef);
ret = SetWindowWord(hwnd, GWLP_HINSTANCE, 0xdead);
todo_wine
- ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#x.\n", ret);
+ ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#lx.\n", ret);
/* GWLP_HWNDPARENT */
retval = GetWindowLongPtrA(hwnd, GWLP_HWNDPARENT);
- ok(!!retval, "Unexpected parent window %#x.\n", ret);
+ ok(!!retval, "Unexpected parent window %#lx.\n", ret);
SetLastError(0xdeadbeef);
ret = GetWindowWord(hwnd, GWLP_HWNDPARENT);
todo_wine
- ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#x.\n", ret);
+ ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#lx.\n", ret);
DestroyWindow(hwnd);
}
@@ -7282,24 +7282,24 @@ static void test_SetWindowLong(void)
SetLastError(0xdeadbeef);
retval = SetWindowLongPtrA(NULL, GWLP_WNDPROC, 0);
- ok(!retval, "SetWindowLongPtr on invalid window handle should have returned 0 instead of 0x%lx\n", retval);
+ ok(!retval, "SetWindowLongPtr on invalid window handle should have returned 0 instead of 0x%Ix\n", retval);
ok(check_error(GetLastError(), ERROR_INVALID_WINDOW_HANDLE),
- "SetWindowLongPtr should have set error to ERROR_INVALID_WINDOW_HANDLE instead of %d\n", GetLastError());
+ "SetWindowLongPtr should have set error to ERROR_INVALID_WINDOW_HANDLE instead of %ld\n", GetLastError());
SetLastError(0xdeadbeef);
retval = SetWindowLongPtrA(hwndMain, 0xdeadbeef, 0);
- ok(!retval, "SetWindowLongPtr on invalid index should have returned 0 instead of 0x%lx\n", retval);
+ ok(!retval, "SetWindowLongPtr on invalid index should have returned 0 instead of 0x%Ix\n", retval);
ok(check_error(GetLastError(), ERROR_INVALID_INDEX),
- "SetWindowLongPtr should have set error to ERROR_INVALID_INDEX instead of %d\n", GetLastError());
+ "SetWindowLongPtr should have set error to ERROR_INVALID_INDEX instead of %ld\n", GetLastError());
SetLastError(0xdeadbeef);
retval = SetWindowLongPtrA(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%lx\n", retval);
- ok(GetLastError() == 0xdeadbeef, "SetWindowLongPtr shouldn't have set the last error, instead of setting it to %d\n", GetLastError());
+ "SetWindowLongPtr on invalid window proc should have returned address of main_window_procA instead of 0x%Ix\n", retval);
+ ok(GetLastError() == 0xdeadbeef, "SetWindowLongPtr shouldn't have set the last error, instead of setting it to %ld\n", GetLastError());
retval = GetWindowLongPtrA(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%lx\n", retval);
+ "SetWindowLongPtr on invalid window proc shouldn't have changed the value returned by GetWindowLongPtr, instead of changing it to 0x%Ix\n", retval);
ok(!IsWindowUnicode(hwndMain), "hwndMain shouldn't be Unicode\n");
old_window_procW = (WNDPROC)GetWindowLongPtrW(hwndMain, GWLP_WNDPROC);
@@ -7307,10 +7307,10 @@ 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 %d\n", GetLastError());
- ok(retval != 0, "SetWindowLongPtr error %d\n", GetLastError());
+ 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((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%lx\n", retval);
+ "SetWindowLongPtr on invalid window proc shouldn't have changed the value returned by GetWindowLongPtr, instead of changing it to 0x%Ix\n", retval);
ok(IsWindowUnicode(hwndMain), "hwndMain should now be Unicode\n");
/* set it back to ANSI */
@@ -7328,16 +7328,16 @@ static LRESULT WINAPI check_style_wnd_proc(HWND hwnd, UINT message, WPARAM wPara
if (message == WM_STYLECHANGING && wParam == GWL_STYLE)
{
- ok(got->styleOld == expected[0].styleOld, "expected old style %#x, got %#x\n",
+ ok(got->styleOld == expected[0].styleOld, "expected old style %#lx, got %#lx\n",
expected[0].styleOld, got->styleOld);
- ok(got->styleNew == expected[0].styleNew, "expected new style %#x, got %#x\n",
+ ok(got->styleNew == expected[0].styleNew, "expected new style %#lx, got %#lx\n",
expected[0].styleNew, got->styleNew);
}
else if (message == WM_STYLECHANGED && wParam == GWL_STYLE)
{
- ok(got->styleOld == expected[1].styleOld, "expected old style %#x, got %#x\n",
+ ok(got->styleOld == expected[1].styleOld, "expected old style %#lx, got %#lx\n",
expected[1].styleOld, got->styleOld);
- ok(got->styleNew == expected[1].styleNew, "expected new style %#x, got %#x\n",
+ ok(got->styleNew == expected[1].styleNew, "expected new style %#lx, got %#lx\n",
expected[1].styleNew, got->styleNew);
}
@@ -7400,10 +7400,10 @@ static void test_set_window_style(void)
SetWindowLongPtrA(hwnd, GWLP_USERDATA, (LONG_PTR)&expected_stylestruct);
old_style = SetWindowLongA(hwnd, GWL_STYLE, tests[i].style);
- ok(old_style == tests[i].creation_style, "expected old style %#x, got %#x\n",
+ ok(old_style == tests[i].creation_style, "expected old style %#lx, got %#lx\n",
tests[i].creation_style, old_style);
new_style = GetWindowLongA(hwnd, GWL_STYLE);
- ok(new_style == expected_style, "expected new style %#x, got %#x\n",
+ ok(new_style == expected_style, "expected new style %#lx, got %#lx\n",
expected_style, new_style);
SetWindowLongPtrA(hwnd, GWLP_USERDATA, 0);
@@ -7471,7 +7471,7 @@ static void test_ShowWindow(void)
wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc));
ret = ShowWindow(hwnd, SW_SHOW);
- ok(!ret, "not expected ret: %lu\n", ret);
+ ok(!ret, "not expected ret: %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7485,7 +7485,7 @@ static void test_ShowWindow(void)
wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc));
ret = ShowWindow(hwnd, SW_MINIMIZE);
- ok(ret, "not expected ret: %lu\n", ret);
+ ok(ret, "not expected ret: %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7502,7 +7502,7 @@ static void test_ShowWindow(void)
(rcMinimized.right - rcMinimized.left) * 2,
(rcMinimized.bottom - rcMinimized.top) * 2,
SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
- ok(ret, "not expected ret: %lu\n", ret);
+ ok(ret, "not expected ret: %Iu\n", ret);
GetWindowRect(hwnd, &rc);
ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
@@ -7512,7 +7512,7 @@ static void test_ShowWindow(void)
/* SetWindowPos shouldn't affect the client rect */
ret = SetWindowPos(hwnd, 0, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
- ok(ret, "not expected ret: %lu\n", ret);
+ ok(ret, "not expected ret: %Iu\n", ret);
GetWindowRect(hwnd, &rc);
ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
@@ -7523,12 +7523,12 @@ static void test_ShowWindow(void)
GetWindowRect(hwnd, &rc);
SetRect(&rcNonClient, rc.left, rc.top, rc.left, rc.top);
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
- ok(!ret, "got %08lx\n", ret);
+ ok(!ret, "got %08Ix\n", ret);
ok(EqualRect(&rc, &rcNonClient), "expected %s, got %s\n",
wine_dbgstr_rect(&rcNonClient), wine_dbgstr_rect(&rc));
ret = ShowWindow(hwnd, SW_RESTORE);
- ok(ret, "not expected ret: %lu\n", ret);
+ ok(ret, "not expected ret: %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7542,7 +7542,7 @@ static void test_ShowWindow(void)
wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc));
ret = ShowWindow(hwnd, SW_MAXIMIZE);
- ok(ret, "not expected ret: %lu\n", ret);
+ ok(ret, "not expected ret: %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7553,14 +7553,14 @@ static void test_ShowWindow(void)
wine_dbgstr_rect(&rcMaximized), wine_dbgstr_rect(&rc));
/* maximized windows can be resized */
ret = SetWindowPos(hwnd, 0, 300, 300, 200, 200, SWP_NOACTIVATE | SWP_NOZORDER);
- ok(ret, "not expected ret: %lu\n", ret);
+ ok(ret, "not expected ret: %Iu\n", ret);
SetRect(&rcResized, 300, 300, 500, 500);
GetWindowRect(hwnd, &rc);
ok(EqualRect(&rcResized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcResized), wine_dbgstr_rect(&rc));
ret = ShowWindow(hwnd, SW_RESTORE);
- ok(ret, "not expected ret: %lu\n", ret);
+ ok(ret, "not expected ret: %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7571,12 +7571,12 @@ static void test_ShowWindow(void)
wine_dbgstr_rect(&rc));
ret = EnableWindow(hwnd, FALSE);
- ok(!ret, "not expected ret: %lu\n", ret);
+ ok(!ret, "not expected ret: %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(style & WS_DISABLED, "window should be disabled\n");
ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
- ok(!ret, "not expected ret: %lu\n", ret);
+ ok(!ret, "not expected ret: %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(style & WS_DISABLED, "window should be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7590,7 +7590,7 @@ static void test_ShowWindow(void)
wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc));
ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0);
- ok(!ret, "not expected ret: %lu\n", ret);
+ ok(!ret, "not expected ret: %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(style & WS_DISABLED, "window should be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7604,7 +7604,7 @@ static void test_ShowWindow(void)
wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc));
ret = ShowWindow(hwnd, SW_MINIMIZE);
- ok(ret, "not expected ret: %lu\n", ret);
+ ok(ret, "not expected ret: %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(style & WS_DISABLED, "window should be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7618,7 +7618,7 @@ static void test_ShowWindow(void)
wine_dbgstr_rect(&rcEmpty), wine_dbgstr_rect(&rc));
ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
- ok(!ret, "not expected ret: %lu\n", ret);
+ ok(!ret, "not expected ret: %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(style & WS_DISABLED, "window should be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7632,7 +7632,7 @@ static void test_ShowWindow(void)
wine_dbgstr_rect(&rcEmpty), wine_dbgstr_rect(&rc));
ret = ShowWindow(hwnd, SW_RESTORE);
- ok(ret, "not expected ret: %lu\n", ret);
+ ok(ret, "not expected ret: %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(style & WS_DISABLED, "window should be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7646,14 +7646,14 @@ static void test_ShowWindow(void)
wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc));
ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_CLOSE, 0);
- ok(!ret, "not expected ret: %lu\n", ret);
+ ok(!ret, "not expected ret: %Iu\n", ret);
ok(IsWindow(hwnd), "window should exist\n");
ret = EnableWindow(hwnd, TRUE);
- ok(ret, "not expected ret: %lu\n", ret);
+ ok(ret, "not expected ret: %Iu\n", ret);
ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_CLOSE, 0);
- ok(!ret, "not expected ret: %lu\n", ret);
+ ok(!ret, "not expected ret: %Iu\n", ret);
ok(!IsWindow(hwnd), "window should not exist\n");
hwnd = CreateWindowExA(0, "MainWindowClass", NULL,
@@ -7662,7 +7662,7 @@ static void test_ShowWindow(void)
rcMain.left, rcMain.top,
rcMain.right - rcMain.left, rcMain.bottom - rcMain.top,
0, 0, 0, NULL);
- ok(hwnd != NULL, "failed to create window with error %u\n", GetLastError());
+ ok(hwnd != NULL, "failed to create window with error %lu\n", GetLastError());
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(style & WS_MINIMIZE, "window should be minimized\n");
GetWindowRect(hwnd, &rc);
@@ -7680,7 +7680,7 @@ static void test_ShowWindow(void)
rcMain.left, rcMain.top,
rcMain.right - rcMain.left, rcMain.bottom - rcMain.top,
0, 0, 0, NULL);
- ok(hwnd != NULL, "failed to create window with error %u\n", GetLastError());
+ ok(hwnd != NULL, "failed to create window with error %lu\n", GetLastError());
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(style & WS_MINIMIZE, "window should be minimized\n");
GetWindowRect(hwnd, &rc);
@@ -7703,7 +7703,7 @@ static void test_ShowWindow(void)
rcMain.left, rcMain.top,
rcMain.right - rcMain.left, rcMain.bottom - rcMain.top,
0, 0, 0, NULL);
- ok(hwnd != NULL, "Test %u: failed to create window with error %u\n", i, GetLastError());
+ ok(hwnd != NULL, "Test %u: failed to create window with error %lu\n", i, GetLastError());
GetWindowRect(hwnd, &rcMain);
ok(rcMain.left > mon_info.rcMonitor.left &&
@@ -7717,7 +7717,7 @@ static void test_ShowWindow(void)
0, GetWindowLongA(hwnd, GWL_EXSTYLE));
ret = ShowWindow(hwnd, SW_MAXIMIZE);
- ok(ret, "unexpected ret: %lu\n", ret);
+ ok(ret, "unexpected ret: %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(style & WS_MAXIMIZE, "Test %u: window should be maximized\n", i);
GetWindowRect(hwnd, &rc);
@@ -7734,7 +7734,7 @@ static void test_ShowWindow(void)
wine_dbgstr_rect(&rc));
ret = ShowWindow(hwnd, SW_RESTORE);
- ok(ret, "unexpected ret: %lu\n", ret);
+ ok(ret, "unexpected ret: %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_MAXIMIZE), "Test %u: window should not be maximized\n", i);
GetWindowRect(hwnd, &rc);
@@ -7761,12 +7761,12 @@ static void test_ShowWindow_owned(HWND hwndMain)
WS_MINIMIZEBOX | WS_MAXIMIZEBOX,
orig.left, orig.top, orig.right - orig.left,
orig.bottom - orig.top, hwndMain, 0, 0, NULL);
- ok(!!hwnd, "failed to create window, error %u\n", GetLastError());
+ ok(!!hwnd, "failed to create window, error %lu\n", GetLastError());
hwnd2 = CreateWindowA("MainWindowClass", "owned2", WS_CAPTION | WS_SYSMENU |
WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_VISIBLE,
orig.left, orig.top, orig.right - orig.left,
orig.bottom - orig.top, hwndMain, 0, 0, NULL);
- ok(!!hwnd2, "failed to create window, error %u\n", GetLastError());
+ ok(!!hwnd2, "failed to create window, error %lu\n", GetLastError());
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
@@ -7778,7 +7778,7 @@ static void test_ShowWindow_owned(HWND hwndMain)
wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_SHOW);
- ok(!ret, "wrong ret %lu\n", ret);
+ ok(!ret, "wrong ret %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7789,7 +7789,7 @@ static void test_ShowWindow_owned(HWND hwndMain)
wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_MINIMIZE);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7803,7 +7803,7 @@ static void test_ShowWindow_owned(HWND hwndMain)
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
/* shouldn't be able to resize minimized windows */
ret = SetWindowPos(hwnd, 0, 0, 0, 200, 200, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
GetWindowRect(hwnd, &rect);
todo_wine
ok(EqualRect(&expect, &rect), "expected %s, got %s\n",
@@ -7812,7 +7812,7 @@ static void test_ShowWindow_owned(HWND hwndMain)
GetWindowRect(hwnd, &rect);
SetRect(&nc, rect.left, rect.top, rect.left, rect.top);
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect);
- ok(!ret, "got %08lx\n", ret);
+ ok(!ret, "got %08Ix\n", ret);
ok(EqualRect(&rect, &nc), "expected %s, got %s\n",
wine_dbgstr_rect(&nc), wine_dbgstr_rect(&rect));
@@ -7820,7 +7820,7 @@ static void test_ShowWindow_owned(HWND hwndMain)
* on top of each other) */
OffsetRect(&expect, GetSystemMetrics(SM_CXMINIMIZED), 0);
ret = ShowWindow(hwnd2, SW_MINIMIZE);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
style = GetWindowLongA(hwnd2, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7832,7 +7832,7 @@ static void test_ShowWindow_owned(HWND hwndMain)
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_RESTORE);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7843,7 +7843,7 @@ static void test_ShowWindow_owned(HWND hwndMain)
wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_MAXIMIZE);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7857,14 +7857,14 @@ static void test_ShowWindow_owned(HWND hwndMain)
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
/* maximized windows can be resized */
ret = SetWindowPos(hwnd, 0, 300, 300, 200, 200, SWP_NOACTIVATE | SWP_NOZORDER);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
GetWindowRect(hwnd, &rect);
SetRect(&expect, 300, 300, 500, 500);
ok(EqualRect(&expect, &rect), "expected %s, got %s\n",
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_RESTORE);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7891,12 +7891,12 @@ static void test_ShowWindow_child(HWND hwndMain)
WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CHILD,
orig.left, orig.top, orig.right - orig.left,
orig.bottom - orig.top, hwndMain, 0, 0, NULL);
- ok(!!hwnd, "failed to create window, error %u\n", GetLastError());
+ ok(!!hwnd, "failed to create window, error %lu\n", GetLastError());
hwnd2 = CreateWindowA("MainWindowClass", "child2", WS_CAPTION | WS_SYSMENU |
WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CHILD | WS_VISIBLE,
orig.left, orig.top, orig.right - orig.left,
orig.bottom - orig.top, hwndMain, 0, 0, NULL);
- ok(!!hwnd2, "failed to create window, error %u\n", GetLastError());
+ ok(!!hwnd2, "failed to create window, error %lu\n", GetLastError());
ClientToScreen(hwndMain, &pt);
OffsetRect(&orig, pt.x, pt.y);
@@ -7911,7 +7911,7 @@ static void test_ShowWindow_child(HWND hwndMain)
wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_SHOW);
- ok(!ret, "wrong ret %lu\n", ret);
+ ok(!ret, "wrong ret %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7922,7 +7922,7 @@ static void test_ShowWindow_child(HWND hwndMain)
wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_MINIMIZE);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7937,7 +7937,7 @@ static void test_ShowWindow_child(HWND hwndMain)
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
/* shouldn't be able to resize minimized windows */
ret = SetWindowPos(hwnd, 0, 0, 0, 200, 200, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
GetWindowRect(hwnd, &rect);
ok(EqualRect(&expect, &rect), "expected %s, got %s\n",
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
@@ -7945,7 +7945,7 @@ static void test_ShowWindow_child(HWND hwndMain)
GetWindowRect(hwnd, &rect);
SetRect(&nc, rect.left, rect.top, rect.left, rect.top);
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect);
- ok(!ret, "got %08lx\n", ret);
+ ok(!ret, "got %08Ix\n", ret);
ok(EqualRect(&rect, &nc), "expected %s, got %s\n",
wine_dbgstr_rect(&nc), wine_dbgstr_rect(&rect));
@@ -7953,7 +7953,7 @@ static void test_ShowWindow_child(HWND hwndMain)
* fit more than one per row */
OffsetRect(&expect, 0, -GetSystemMetrics(SM_CYMINIMIZED));
ret = ShowWindow(hwnd2, SW_MINIMIZE);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
style = GetWindowLongA(hwnd2, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7964,7 +7964,7 @@ static void test_ShowWindow_child(HWND hwndMain)
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_RESTORE);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7975,7 +7975,7 @@ static void test_ShowWindow_child(HWND hwndMain)
wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_MAXIMIZE);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -7990,7 +7990,7 @@ static void test_ShowWindow_child(HWND hwndMain)
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
/* maximized windows can be resized */
ret = SetWindowPos(hwnd, 0, 300, 300, 200, 200, SWP_NOACTIVATE | SWP_NOZORDER);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
GetWindowRect(hwnd, &rect);
SetRect(&expect, 300, 300, 500, 500);
OffsetRect(&expect, pt.x, pt.y);
@@ -7998,7 +7998,7 @@ static void test_ShowWindow_child(HWND hwndMain)
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_RESTORE);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -8026,17 +8026,17 @@ static void test_ShowWindow_mdichild(HWND hwndMain)
mdiclient = CreateWindowA("mdiclient", "MDI client", WS_CHILD,
rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
hwndMain, 0, 0, &mdi_client_cs);
- ok(!!mdiclient, "failed to create window, error %u\n", GetLastError());
+ ok(!!mdiclient, "failed to create window, error %lu\n", GetLastError());
hwnd = CreateWindowExA(WS_EX_MDICHILD, "MainWindowClass", "MDI child",
WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,
orig.left, orig.top, orig.right - orig.left,
orig.bottom - orig.top, mdiclient, 0, 0, NULL);
- ok(!!hwnd, "failed to create window, error %u\n", GetLastError());
+ ok(!!hwnd, "failed to create window, error %lu\n", GetLastError());
hwnd2 = CreateWindowExA(WS_EX_MDICHILD, "MainWindowClass", "MDI child 2",
WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,
orig.left, orig.top, orig.right - orig.left,
orig.bottom - orig.top, mdiclient, 0, 0, NULL);
- ok(!!hwnd2, "failed to create window, error %u\n", GetLastError());
+ ok(!!hwnd2, "failed to create window, error %lu\n", GetLastError());
ClientToScreen(hwndMain, &pt);
OffsetRect(&orig, pt.x, pt.y);
@@ -8051,7 +8051,7 @@ static void test_ShowWindow_mdichild(HWND hwndMain)
wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_MINIMIZE);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -8066,7 +8066,7 @@ static void test_ShowWindow_mdichild(HWND hwndMain)
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
/* shouldn't be able to resize minimized windows */
ret = SetWindowPos(hwnd, 0, 0, 0, 200, 200, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
GetWindowRect(hwnd, &rect);
ok(EqualRect(&expect, &rect), "expected %s, got %s\n",
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
@@ -8074,7 +8074,7 @@ static void test_ShowWindow_mdichild(HWND hwndMain)
GetWindowRect(hwnd, &rect);
SetRect(&nc, rect.left, rect.top, rect.left, rect.top);
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect);
- ok(!ret, "got %08lx\n", ret);
+ ok(!ret, "got %08Ix\n", ret);
ok(EqualRect(&rect, &nc), "expected %s, got %s\n",
wine_dbgstr_rect(&nc), wine_dbgstr_rect(&rect));
@@ -8082,7 +8082,7 @@ static void test_ShowWindow_mdichild(HWND hwndMain)
* fit more than one per row */
OffsetRect(&expect, 0, -GetSystemMetrics(SM_CYMINIMIZED));
ret = ShowWindow(hwnd2, SW_MINIMIZE);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
style = GetWindowLongA(hwnd2, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -8093,7 +8093,7 @@ static void test_ShowWindow_mdichild(HWND hwndMain)
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_RESTORE);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -8104,7 +8104,7 @@ static void test_ShowWindow_mdichild(HWND hwndMain)
wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_MAXIMIZE);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -8119,7 +8119,7 @@ static void test_ShowWindow_mdichild(HWND hwndMain)
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
/* maximized windows can be resized */
ret = SetWindowPos(hwnd, 0, 300, 300, 200, 200, SWP_NOACTIVATE | SWP_NOZORDER);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
GetWindowRect(hwnd, &rect);
SetRect(&expect, 300, 300, 500, 500);
OffsetRect(&expect, pt.x, pt.y);
@@ -8127,7 +8127,7 @@ static void test_ShowWindow_mdichild(HWND hwndMain)
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_RESTORE);
- ok(ret, "wrong ret %lu\n", ret);
+ ok(ret, "wrong ret %Iu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
@@ -8231,7 +8231,7 @@ static DWORD CALLBACK gettext_msg_thread( LPVOID arg )
buf_len = GetWindowTextA( hwnd, buf, sizeof(buf) );
ok( buf_len != 0, "expected a nonempty window text\n" );
ok( !strcmp(buf, "another_caption"), "got wrong window text '%s'\n", buf );
- ok( num_gettext_msgs == 1, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 1, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
return 0;
}
@@ -8245,7 +8245,7 @@ static DWORD CALLBACK settext_msg_thread( LPVOID arg )
num_settext_msgs = 0;
success = SetWindowTextA( hwnd, "thread_caption" );
ok( success, "SetWindowTextA failed\n" );
- ok( num_settext_msgs == 1, "got %u WM_SETTEXT messages\n", num_settext_msgs );
+ ok( num_settext_msgs == 1, "got %lu WM_SETTEXT messages\n", num_settext_msgs );
return 0;
}
@@ -8264,7 +8264,7 @@ static void test_gettext(void)
MSG msg;
hwnd = CreateWindowExA( 0, "MainWindowClass", "caption", WS_POPUP, 0, 0, 0, 0, 0, 0, 0, NULL );
- ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() );
+ ok( hwnd != 0, "CreateWindowExA error %ld\n", GetLastError() );
/* test GetWindowTextA */
num_gettext_msgs = 0;
@@ -8272,7 +8272,7 @@ static void test_gettext(void)
buf_len = GetWindowTextA( hwnd, buf, sizeof(buf) );
ok( buf_len != 0, "expected a nonempty window text\n" );
ok( !strcmp(buf, "caption"), "got wrong window text '%s'\n", buf );
- ok( num_gettext_msgs == 1, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 1, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
/* other process window */
strcpy( buf, "a" );
@@ -8298,7 +8298,7 @@ static void test_gettext(void)
buf_len = GetWindowTextA( hwnd, buf, sizeof(buf) );
ok( buf_len == 0, "got %d\n", buf_len );
ok( *buf == 0, "got %x\n", *buf );
- ok( num_gettext_msgs == 1, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 1, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0;
strcpy( buf, "blah" );
@@ -8306,13 +8306,13 @@ static void test_gettext(void)
buf_len = GetWindowTextA( hwnd, buf, 0 );
ok( buf_len == 0, "got %d\n", buf_len );
ok( !strcmp(buf, "blah"), "got %s\n", buf );
- ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
g_wm_gettext_override.enabled = FALSE;
/* same for W window */
hwnd2 = CreateWindowExW( 0, mainclassW, NULL, WS_POPUP, 0, 0, 0, 0, 0, 0, 0, NULL );
- ok( hwnd2 != 0, "CreateWindowExA error %d\n", GetLastError() );
+ ok( hwnd2 != 0, "CreateWindowExA error %ld\n", GetLastError() );
g_wm_gettext_override.enabled = TRUE;
@@ -8322,7 +8322,7 @@ static void test_gettext(void)
buf_len = GetWindowTextW( hwnd2, bufW, ARRAY_SIZE(bufW));
ok( buf_len == 0, "got %d\n", buf_len );
ok( *bufW == 0, "got %x\n", *bufW );
- ok( num_gettext_msgs == 1, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 1, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0;
memset( bufW, 0xcc, sizeof(bufW) );
@@ -8330,7 +8330,7 @@ static void test_gettext(void)
buf_len = GetWindowTextW( hwnd2, bufW, 0 );
ok( buf_len == 0, "got %d\n", buf_len );
ok( *bufW == 0xcccc, "got %x\n", *bufW );
- ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
g_wm_gettext_override.enabled = FALSE;
@@ -8342,33 +8342,33 @@ static void test_gettext(void)
r = SendMessageA( hwnd, WM_GETTEXT, sizeof(buf), (LONG_PTR)buf );
ok( r != 0, "expected a nonempty window text\n" );
ok( !strcmp(buf, "caption"), "got wrong window text '%s'\n", buf );
- ok( num_gettext_msgs == 1, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 1, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
/* test SetWindowTextA */
num_settext_msgs = 0;
success = SetWindowTextA( hwnd, "new_caption" );
ok( success, "SetWindowTextA failed\n" );
- ok( num_settext_msgs == 1, "got %u WM_SETTEXT messages\n", num_settext_msgs );
+ ok( num_settext_msgs == 1, "got %lu WM_SETTEXT messages\n", num_settext_msgs );
num_gettext_msgs = 0;
memset( buf, 0, sizeof(buf) );
buf_len = GetWindowTextA( hwnd, buf, sizeof(buf) );
ok( buf_len != 0, "expected a nonempty window text\n" );
ok( !strcmp(buf, "new_caption"), "got wrong window text '%s'\n", buf );
- ok( num_gettext_msgs == 1, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 1, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
/* test WM_SETTEXT */
num_settext_msgs = 0;
r = SendMessageA( hwnd, WM_SETTEXT, 0, (ULONG_PTR)"another_caption" );
ok( r != 0, "WM_SETTEXT failed\n" );
- ok( num_settext_msgs == 1, "got %u WM_SETTEXT messages\n", num_settext_msgs );
+ ok( num_settext_msgs == 1, "got %lu WM_SETTEXT messages\n", num_settext_msgs );
num_gettext_msgs = 0;
memset( buf, 0, sizeof(buf) );
buf_len = GetWindowTextA( hwnd, buf, sizeof(buf) );
ok( buf_len != 0, "expected a nonempty window text\n" );
ok( !strcmp(buf, "another_caption"), "got wrong window text '%s'\n", buf );
- ok( num_gettext_msgs == 1, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 1, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
while (PeekMessageA( &msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE ))
DispatchMessageA( &msg );
@@ -8376,7 +8376,7 @@ static void test_gettext(void)
/* test interthread GetWindowTextA */
num_msgs = 0;
thread = CreateThread( NULL, 0, gettext_msg_thread, hwnd, 0, &tid );
- ok(thread != NULL, "CreateThread failed, error %d\n", GetLastError());
+ ok(thread != NULL, "CreateThread failed, error %ld\n", GetLastError());
while (MsgWaitForMultipleObjects( 1, &thread, FALSE, INFINITE, QS_SENDMESSAGE ) != WAIT_OBJECT_0)
{
while (PeekMessageA( &msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE ))
@@ -8384,12 +8384,12 @@ static void test_gettext(void)
num_msgs++;
}
CloseHandle( thread );
- ok( num_msgs >= 1, "got %u wakeups from MsgWaitForMultipleObjects\n", num_msgs );
+ ok( num_msgs >= 1, "got %lu wakeups from MsgWaitForMultipleObjects\n", num_msgs );
/* test interthread SetWindowText */
num_msgs = 0;
thread = CreateThread( NULL, 0, settext_msg_thread, hwnd, 0, &tid );
- ok(thread != NULL, "CreateThread failed, error %d\n", GetLastError());
+ ok(thread != NULL, "CreateThread failed, error %ld\n", GetLastError());
while (MsgWaitForMultipleObjects( 1, &thread, FALSE, INFINITE, QS_SENDMESSAGE ) != WAIT_OBJECT_0)
{
while (PeekMessageA( &msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE ))
@@ -8397,14 +8397,14 @@ static void test_gettext(void)
num_msgs++;
}
CloseHandle( thread );
- ok( num_msgs >= 1, "got %u wakeups from MsgWaitForMultipleObjects\n", num_msgs );
+ ok( num_msgs >= 1, "got %lu wakeups from MsgWaitForMultipleObjects\n", num_msgs );
num_gettext_msgs = 0;
memset( buf, 0, sizeof(buf) );
buf_len = GetWindowTextA( hwnd, buf, sizeof(buf) );
ok( buf_len != 0, "expected a nonempty window text\n" );
ok( !strcmp(buf, "thread_caption"), "got wrong window text '%s'\n", buf );
- ok( num_gettext_msgs == 1, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 1, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
/* WM_GETTEXT does not terminate returned string */
memset( buf, 0x1c, sizeof(buf) );
@@ -8424,7 +8424,7 @@ static void test_gettext(void)
g_wm_gettext_override.dont_terminate = FALSE;
hwnd2 = CreateWindowExW( 0, mainclassW, NULL, WS_POPUP, 0, 0, 0, 0, 0, 0, 0, NULL );
- ok( hwnd2 != 0, "CreateWindowExA error %d\n", GetLastError() );
+ ok( hwnd2 != 0, "CreateWindowExA error %ld\n", GetLastError() );
memset( buf, 0x1c, sizeof(buf) );
g_wm_gettext_override.dont_terminate = TRUE;
@@ -8448,36 +8448,36 @@ static void test_gettext(void)
if (0)
{
r = SendMessageA( hwnd, WM_GETTEXT, 0x10, 0x1000);
- ok( r == 0, "WM_GETTEXT should return zero (%ld)\n", r );
+ ok( r == 0, "WM_GETTEXT should return zero (%Id)\n", r );
r = SendMessageA( hwnd, WM_GETTEXT, 0x10000, 0);
- ok( r == 0, "WM_GETTEXT should return zero (%ld)\n", r );
+ ok( r == 0, "WM_GETTEXT should return zero (%Id)\n", r );
r = SendMessageA( hwnd, WM_GETTEXT, 0xff000000, 0x1000);
- ok( r == 0, "WM_GETTEXT should return zero (%ld)\n", r );
+ ok( r == 0, "WM_GETTEXT should return zero (%Id)\n", r );
r = SendMessageA( hwnd, WM_GETTEXT, 0x1000, 0xff000000);
- ok( r == 0, "WM_GETTEXT should return zero (%ld)\n", r );
+ ok( r == 0, "WM_GETTEXT should return zero (%Id)\n", r );
}
/* GetWindowText doesn't crash */
r = GetWindowTextA( hwnd, (LPSTR)0x10, 0x1000 );
- ok( r == 0, "GetWindowText should return zero (%ld)\n", r );
+ ok( r == 0, "GetWindowText should return zero (%Id)\n", r );
r = GetWindowTextA( hwnd, (LPSTR)0x10000, 0 );
- ok( r == 0, "GetWindowText should return zero (%ld)\n", r );
+ ok( r == 0, "GetWindowText should return zero (%Id)\n", r );
r = GetWindowTextA( hwnd, (LPSTR)0xff000000, 0x1000 );
- ok( r == 0, "GetWindowText should return zero (%ld)\n", r );
+ ok( r == 0, "GetWindowText should return zero (%Id)\n", r );
r = GetWindowTextA( hwnd, (LPSTR)0x1000, 0xff000000 );
- ok( r == 0, "GetWindowText should return zero (%ld)\n", r );
+ ok( r == 0, "GetWindowText should return zero (%Id)\n", r );
r = GetWindowTextW( hwnd, (LPWSTR)0x10, 0x1000 );
- ok( r == 0, "GetWindowText should return zero (%ld)\n", r );
+ ok( r == 0, "GetWindowText should return zero (%Id)\n", r );
r = GetWindowTextW( hwnd, (LPWSTR)0x10000, 0 );
- ok( r == 0, "GetWindowText should return zero (%ld)\n", r );
+ ok( r == 0, "GetWindowText should return zero (%Id)\n", r );
r = GetWindowTextW( hwnd, (LPWSTR)0xff000000, 0x1000 );
- ok( r == 0, "GetWindowText should return zero (%ld)\n", r );
+ ok( r == 0, "GetWindowText should return zero (%Id)\n", r );
r = GetWindowTextW( hwnd, (LPWSTR)0x1000, 0xff000000);
- ok( r == 0, "GetWindowText should return zero (%ld)\n", r );
+ ok( r == 0, "GetWindowText should return zero (%Id)\n", r );
DestroyWindow(hwnd);
}
@@ -8736,12 +8736,12 @@ static void test_GetWindowModuleFileName(void)
buf1[0] = 0;
SetLastError(0xdeadbeef);
ret1 = GetModuleFileNameA(hinst, buf1, sizeof(buf1));
- ok(ret1, "GetModuleFileName error %u\n", GetLastError());
+ ok(ret1, "GetModuleFileName error %lu\n", GetLastError());
buf2[0] = 0;
SetLastError(0xdeadbeef);
ret2 = pGetWindowModuleFileNameA(hwnd, buf2, sizeof(buf2));
- ok(ret2, "GetWindowModuleFileNameA error %u\n", GetLastError());
+ ok(ret2, "GetWindowModuleFileNameA error %lu\n", GetLastError());
if (ret2)
{
@@ -8755,28 +8755,28 @@ static void test_GetWindowModuleFileName(void)
ok(ret2 == ret1 - 2, "expected %u, got %u\n", ret1 - 2, ret2);
ok(GetLastError() == 0xdeadbeef /* XP */ ||
GetLastError() == ERROR_INSUFFICIENT_BUFFER, /* win2k3, vista */
- "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError());
+ "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret2 = GetModuleFileNameA(hinst, buf2, 0);
ok(!ret2, "GetModuleFileName should return 0\n");
ok(GetLastError() == 0xdeadbeef /* XP */ ||
GetLastError() == ERROR_INSUFFICIENT_BUFFER, /* win2k3, vista */
- "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError());
+ "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret2 = pGetWindowModuleFileNameA(hwnd, buf2, ret1 - 2);
ok(ret2 == ret1 - 2, "expected %u, got %u\n", ret1 - 2, ret2);
ok(GetLastError() == 0xdeadbeef /* XP */ ||
GetLastError() == ERROR_INSUFFICIENT_BUFFER, /* win2k3, vista */
- "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError());
+ "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret2 = pGetWindowModuleFileNameA(hwnd, buf2, 0);
ok(!ret2, "expected 0, got %u\n", ret2);
ok(GetLastError() == 0xdeadbeef /* XP */ ||
GetLastError() == ERROR_INSUFFICIENT_BUFFER, /* win2k3, vista */
- "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError());
+ "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError());
DestroyWindow(hwnd);
@@ -8786,7 +8786,7 @@ static void test_GetWindowModuleFileName(void)
ret1 = pGetWindowModuleFileNameA(hwnd, buf1, sizeof(buf1));
ok(!ret1, "expected 0, got %u\n", ret1);
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE,
- "expected ERROR_INVALID_WINDOW_HANDLE, got %u\n", GetLastError());
+ "expected ERROR_INVALID_WINDOW_HANDLE, got %lu\n", GetLastError());
hwnd = FindWindowA("Shell_TrayWnd", NULL);
ok(IsWindow(hwnd) || broken(!hwnd), "got invalid tray window %p\n", hwnd);
@@ -8860,7 +8860,7 @@ static void test_hwnd_message(void)
SetLastError(0xdeadbeef);
found = FindWindowExA( GetDesktopWindow(), 0, 0, "message window" );
ok( found == 0, "found message window %p/%p\n", found, hwnd );
- ok( GetLastError() == 0xdeadbeef, "expected deadbeef, got %d\n", GetLastError() );
+ ok( GetLastError() == 0xdeadbeef, "expected deadbeef, got %ld\n", GetLastError() );
if (parent)
{
found = FindWindowExA( parent, 0, 0, "message window" );
@@ -8881,13 +8881,13 @@ static void test_hwnd_message(void)
{
SetLastError( 0xdeadbeef );
result = GetWindowLongPtrW( parent, tests[i].offset );
- ok( result == tests[i].expect, "offset %d, got %08lx expect %08lx\n",
+ ok( result == tests[i].expect, "offset %d, got %08Ix expect %08Ix\n",
tests[i].offset, result, tests[i].expect );
if (tests[i].error)
- ok( GetLastError() == tests[i].error, "offset %d: error %d expect %d\n",
+ ok( GetLastError() == tests[i].error, "offset %d: error %ld expect %ld\n",
tests[i].offset, GetLastError(), tests[i].error );
else
- ok( GetLastError() == 0xdeadbeef, "offset %d: error %d expect unchanged\n",
+ ok( GetLastError() == 0xdeadbeef, "offset %d: error %ld expect unchanged\n",
tests[i].offset, GetLastError() );
}
@@ -8923,7 +8923,7 @@ static void test_layered_window(void)
SetLastError( 0xdeadbeef );
ret = pUpdateLayeredWindow( hwnd, 0, NULL, &sz, hdc, &pt, 0, NULL, ULW_OPAQUE );
ok( !ret, "UpdateLayeredWindow should fail on non-layered window\n" );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError() );
ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags );
ok( !ret, "GetLayeredWindowAttributes should fail on non-layered window\n" );
ret = pSetLayeredWindowAttributes( hwnd, 0, 0, LWA_ALPHA );
@@ -8939,13 +8939,13 @@ static void test_layered_window(void)
ok( ret, "SetLayeredWindowAttributes should succeed on layered window\n" );
ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags );
ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" );
- ok( key == 0x123456 || key == 0, "wrong color key %x\n", key );
+ ok( key == 0x123456 || key == 0, "wrong color key %lx\n", key );
ok( alpha == 44, "wrong alpha %u\n", alpha );
- ok( flags == LWA_ALPHA, "wrong flags %x\n", flags );
+ ok( flags == LWA_ALPHA, "wrong flags %lx\n", flags );
SetLastError( 0xdeadbeef );
ret = pUpdateLayeredWindow( hwnd, 0, NULL, &sz, hdc, &pt, 0, NULL, ULW_OPAQUE );
ok( !ret, "UpdateLayeredWindow should fail on layered but initialized window\n" );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError() );
/* clearing WS_EX_LAYERED resets attributes */
SetWindowLongA( hwnd, GWL_EXSTYLE, GetWindowLongA(hwnd, GWL_EXSTYLE) & ~WS_EX_LAYERED );
@@ -8961,7 +8961,7 @@ static void test_layered_window(void)
ok( ret, "UpdateLayeredWindow should succeed on layered window\n" );
ret = pUpdateLayeredWindow( hwnd, 0, NULL, &sz, hdc, &pt, 0, NULL, ULW_OPAQUE | ULW_EX_NORESIZE );
ok( !ret, "UpdateLayeredWindow should fail with ex flag\n" );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
if (pUpdateLayeredWindowIndirect)
{
UPDATELAYEREDWINDOWINFO info;
@@ -8983,7 +8983,7 @@ static void test_layered_window(void)
ok( !ret, "UpdateLayeredWindowIndirect should fail\n" );
/* particular error code differs from version to version, could be ERROR_INCORRECT_SIZE,
ERROR_MR_MID_NOT_FOUND or ERROR_GEN_FAILURE (Win8/Win10) */
- ok( GetLastError() != 0, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() != 0, "wrong error %lu\n", GetLastError() );
info.dwFlags = ULW_OPAQUE;
ret = pUpdateLayeredWindowIndirect( hwnd, &info );
ok( ret, "UpdateLayeredWindowIndirect should succeed on layered window\n" );
@@ -8991,38 +8991,38 @@ static void test_layered_window(void)
info.dwFlags = ULW_OPAQUE | 0xf00;
ret = pUpdateLayeredWindowIndirect( hwnd, &info );
ok( !ret, "UpdateLayeredWindowIndirect should fail\n" );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
info.cbSize--;
info.dwFlags = ULW_OPAQUE;
ret = pUpdateLayeredWindowIndirect( hwnd, &info );
ok( !ret, "UpdateLayeredWindowIndirect should fail\n" );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
ret = pUpdateLayeredWindowIndirect( hwnd, NULL );
ok( !ret, "UpdateLayeredWindowIndirect should fail\n" );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
}
ret = pSetLayeredWindowAttributes( hwnd, 0x654321, 22, LWA_COLORKEY | LWA_ALPHA );
ok( ret, "SetLayeredWindowAttributes should succeed on layered window\n" );
ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags );
ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" );
- ok( key == 0x654321, "wrong color key %x\n", key );
+ ok( key == 0x654321, "wrong color key %lx\n", key );
ok( alpha == 22, "wrong alpha %u\n", alpha );
- ok( flags == (LWA_COLORKEY | LWA_ALPHA), "wrong flags %x\n", flags );
+ ok( flags == (LWA_COLORKEY | LWA_ALPHA), "wrong flags %lx\n", flags );
SetLastError( 0xdeadbeef );
ret = pUpdateLayeredWindow( hwnd, 0, NULL, &sz, hdc, &pt, 0, NULL, ULW_OPAQUE );
ok( !ret, "UpdateLayeredWindow should fail on layered but initialized window\n" );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError() );
ret = pSetLayeredWindowAttributes( hwnd, 0x888888, 33, LWA_COLORKEY );
ok( ret, "SetLayeredWindowAttributes should succeed on layered window\n" );
alpha = 0;
ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags );
ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" );
- ok( key == 0x888888, "wrong color key %x\n", key );
+ ok( key == 0x888888, "wrong color key %lx\n", key );
/* alpha not changed on vista if LWA_ALPHA is not set */
ok( alpha == 22 || alpha == 33, "wrong alpha %u\n", alpha );
- ok( flags == LWA_COLORKEY, "wrong flags %x\n", flags );
+ ok( flags == LWA_COLORKEY, "wrong flags %lx\n", flags );
/* color key may or may not be changed without LWA_COLORKEY */
ret = pSetLayeredWindowAttributes( hwnd, 0x999999, 44, 0 );
@@ -9030,9 +9030,9 @@ static void test_layered_window(void)
alpha = 0;
ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags );
ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" );
- ok( key == 0x888888 || key == 0x999999, "wrong color key %x\n", key );
+ ok( key == 0x888888 || key == 0x999999, "wrong color key %lx\n", key );
ok( alpha == 22 || alpha == 44, "wrong alpha %u\n", alpha );
- ok( flags == 0, "wrong flags %x\n", flags );
+ ok( flags == 0, "wrong flags %lx\n", flags );
/* default alpha and color key is 0 */
SetWindowLongA( hwnd, GWL_EXSTYLE, GetWindowLongA(hwnd, GWL_EXSTYLE) & ~WS_EX_LAYERED );
@@ -9041,9 +9041,9 @@ static void test_layered_window(void)
ok( ret, "SetLayeredWindowAttributes should succeed on layered window\n" );
ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags );
ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" );
- ok( key == 0 || key == 0x222222, "wrong color key %x\n", key );
+ ok( key == 0 || key == 0x222222, "wrong color key %lx\n", key );
ok( alpha == 0 || alpha == 55, "wrong alpha %u\n", alpha );
- ok( flags == 0, "wrong flags %x\n", flags );
+ ok( flags == 0, "wrong flags %lx\n", flags );
/* test layered window with WS_CLIPCHILDREN flag */
SetWindowLongA( hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) | WS_CLIPCHILDREN );
@@ -9051,7 +9051,7 @@ static void test_layered_window(void)
SetWindowLongA( hwnd, GWL_EXSTYLE, GetWindowLongA(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED );
child = CreateWindowExA( 0, "button", "button", WS_VISIBLE | WS_CHILD,
0, 0, 50, 50, hwnd, 0, 0, NULL );
- ok( child != NULL, "CreateWindowEx error %u\n", GetLastError() );
+ ok( child != NULL, "CreateWindowEx error %lu\n", GetLastError() );
ShowWindow( hwnd, SW_SHOW );
ret = pSetLayeredWindowAttributes( hwnd, 0, 255, LWA_ALPHA );
@@ -9102,16 +9102,16 @@ static LRESULT CALLBACK fullscreen_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPAR
case WM_GETMINMAXINFO:
{
MINMAXINFO *minmax = (MINMAXINFO *)lp;
- ok(minmax->ptMaxPosition.x <= mi.rcMonitor.left, "%d <= %d\n", minmax->ptMaxPosition.x, mi.rcMonitor.left);
- ok(minmax->ptMaxPosition.y <= mi.rcMonitor.top, "%d <= %d\n", minmax->ptMaxPosition.y, mi.rcMonitor.top);
- ok(minmax->ptMaxSize.x >= mi.rcMonitor.right, "%d >= %d\n", minmax->ptMaxSize.x, mi.rcMonitor.right);
- ok(minmax->ptMaxSize.y >= mi.rcMonitor.bottom, "%d >= %d\n", minmax->ptMaxSize.y, mi.rcMonitor.bottom);
+ ok(minmax->ptMaxPosition.x <= mi.rcMonitor.left, "%ld <= %ld\n", minmax->ptMaxPosition.x, mi.rcMonitor.left);
+ ok(minmax->ptMaxPosition.y <= mi.rcMonitor.top, "%ld <= %ld\n", minmax->ptMaxPosition.y, mi.rcMonitor.top);
+ ok(minmax->ptMaxSize.x >= mi.rcMonitor.right, "%ld >= %ld\n", minmax->ptMaxSize.x, mi.rcMonitor.right);
+ ok(minmax->ptMaxSize.y >= mi.rcMonitor.bottom, "%ld >= %ld\n", minmax->ptMaxSize.y, mi.rcMonitor.bottom);
break;
}
case WM_NCCALCSIZE:
{
LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wp, lp);
- ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wp, lp);
+ ok(!ret, "got %08Ix (%08Ix %08Ix)\n", ret, wp, lp);
return ret;
}
}
@@ -9138,12 +9138,12 @@ static void test_fullscreen(void)
pt.x = pt.y = 0;
SetLastError(0xdeadbeef);
hmon = MonitorFromPoint(pt, MONITOR_DEFAULTTOPRIMARY);
- ok(hmon != 0, "MonitorFromPoint error %u\n", GetLastError());
+ ok(hmon != 0, "MonitorFromPoint error %lu\n", GetLastError());
mi.cbSize = sizeof(mi);
SetLastError(0xdeadbeef);
ret = GetMonitorInfoA(hmon, &mi);
- ok(ret, "GetMonitorInfo error %u\n", GetLastError());
+ ok(ret, "GetMonitorInfo error %lu\n", GetLastError());
trace("monitor %s, work %s\n", wine_dbgstr_rect(&mi.rcMonitor), wine_dbgstr_rect(&mi.rcWork));
cls.style = 0;
@@ -9175,58 +9175,58 @@ static void test_fullscreen(void)
hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style,
mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom,
GetDesktopWindow(), 0, GetModuleHandleA(NULL), NULL);
- ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style);
+ ok(hwnd != 0, "%d: CreateWindowExA(%#lx/%#lx) failed\n", i, ex_style, style);
GetWindowRect(hwnd, &rc);
ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top &&
rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom,
- "%#x/%#x: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc));
+ "%#lx/%#lx: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc));
DestroyWindow(hwnd);
style = t_style[i] | WS_MAXIMIZE;
hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style,
mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom,
GetDesktopWindow(), 0, GetModuleHandleA(NULL), NULL);
- ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style);
+ ok(hwnd != 0, "%d: CreateWindowExA(%#lx/%#lx) failed\n", i, ex_style, style);
GetWindowRect(hwnd, &rc);
ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top &&
rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom,
- "%#x/%#x: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc));
+ "%#lx/%#lx: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc));
DestroyWindow(hwnd);
style = t_style[i] | WS_MAXIMIZE | WS_CAPTION;
hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style,
mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom,
GetDesktopWindow(), 0, GetModuleHandleA(NULL), NULL);
- ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style);
+ ok(hwnd != 0, "%d: CreateWindowExA(%#lx/%#lx) failed\n", i, ex_style, style);
GetWindowRect(hwnd, &rc);
ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top &&
rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom,
- "%#x/%#x: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc));
+ "%#lx/%#lx: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc));
DestroyWindow(hwnd);
style = t_style[i] | WS_CAPTION | WS_MAXIMIZEBOX;
hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style,
mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom,
GetDesktopWindow(), 0, GetModuleHandleA(NULL), NULL);
- ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style);
+ ok(hwnd != 0, "%d: CreateWindowExA(%#lx/%#lx) failed\n", i, ex_style, style);
GetWindowRect(hwnd, &rc);
ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top &&
rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom,
- "%#x/%#x: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc));
+ "%#lx/%#lx: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc));
DestroyWindow(hwnd);
style = t_style[i] | WS_MAXIMIZE | WS_CAPTION | WS_MAXIMIZEBOX;
hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style,
mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom,
GetDesktopWindow(), 0, GetModuleHandleA(NULL), NULL);
- ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style);
+ ok(hwnd != 0, "%d: CreateWindowExA(%#lx/%#lx) failed\n", i, ex_style, style);
GetWindowRect(hwnd, &rc);
/* Windows makes a maximized window slightly larger (to hide the borders?) */
fixup = min(abs(rc.left), abs(rc.top));
InflateRect(&rc, -fixup, -fixup);
ok(rc.left >= mi.rcMonitor.left && rc.top >= mi.rcMonitor.top &&
rc.right <= mi.rcMonitor.right && rc.bottom <= mi.rcMonitor.bottom,
- "%#x/%#x: window rect %s must be in %s\n", ex_style, style, wine_dbgstr_rect(&rc),
+ "%#lx/%#lx: window rect %s must be in %s\n", ex_style, style, wine_dbgstr_rect(&rc),
wine_dbgstr_rect(&mi.rcMonitor));
DestroyWindow(hwnd);
@@ -9234,7 +9234,7 @@ static void test_fullscreen(void)
hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style,
mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom,
GetDesktopWindow(), 0, GetModuleHandleA(NULL), NULL);
- ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style);
+ ok(hwnd != 0, "%d: CreateWindowExA(%#lx/%#lx) failed\n", i, ex_style, style);
GetWindowRect(hwnd, &rc);
/* Windows makes a maximized window slightly larger (to hide the borders?) */
fixup = min(abs(rc.left), abs(rc.top));
@@ -9242,11 +9242,11 @@ static void test_fullscreen(void)
if (style & (WS_CHILD | WS_POPUP))
ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top &&
rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom,
- "%#x/%#x: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc));
+ "%#lx/%#lx: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc));
else
ok(rc.left >= mi.rcMonitor.left && rc.top >= mi.rcMonitor.top &&
rc.right <= mi.rcMonitor.right && rc.bottom <= mi.rcMonitor.bottom,
- "%#x/%#x: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc));
+ "%#lx/%#lx: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc));
DestroyWindow(hwnd);
}
}
@@ -9255,7 +9255,7 @@ static void test_fullscreen(void)
/* Add WS_THICKFRAME style later so that the window can cover the entire monitor */
hwnd = CreateWindowA("fullscreen_class", NULL, WS_POPUP | WS_VISIBLE, 0, 0, mi.rcMonitor.right,
mi.rcMonitor.bottom, NULL, NULL, GetModuleHandleA(NULL), NULL);
- ok(!!hwnd, "CreateWindow failed, error %#x.\n", GetLastError());
+ ok(!!hwnd, "CreateWindow failed, error %#lx.\n", GetLastError());
flush_events(TRUE);
/* Add WS_THICKFRAME and exit full screen */
@@ -9273,8 +9273,8 @@ static void test_fullscreen(void)
if (rc.right - rc.left == 100 && rc.bottom - rc.top == 100)
break;
}
- ok(rc.right - rc.left == 100, "Expect width %d, got %d.\n", 100, rc.right - rc.left);
- ok(rc.bottom - rc.top == 100, "Expect height %d, got %d.\n", 100, rc.bottom - rc.top);
+ ok(rc.right - rc.left == 100, "Expect width %d, got %ld.\n", 100, rc.right - rc.left);
+ ok(rc.bottom - rc.top == 100, "Expect height %d, got %ld.\n", 100, rc.bottom - rc.top);
DestroyWindow(hwnd);
UnregisterClassA("fullscreen_class", GetModuleHandleA(NULL));
@@ -9313,7 +9313,7 @@ static LRESULT WINAPI test_thick_child_size_winproc(HWND hwnd, UINT msg, WPARAM
minmax = (MINMAXINFO *)lparam;
if (winetest_debug > 1)
{
- trace("hwnd %p, WM_GETMINMAXINFO, %08lx, %08lx\n", hwnd, wparam, lparam);
+ trace("hwnd %p, WM_GETMINMAXINFO, %08Ix, %08Ix\n", hwnd, wparam, lparam);
dump_minmax_info( minmax );
}
test_thick_child_got_minmax = TRUE;
@@ -9377,7 +9377,7 @@ static LRESULT WINAPI test_thick_child_size_winproc(HWND hwnd, UINT msg, WPARAM
case WM_NCCALCSIZE:
{
LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam);
- ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam);
+ ok(!ret, "got %08Ix (%08Ix %08Ix)\n", ret, wparam, lparam);
return ret;
}
}
@@ -9468,7 +9468,7 @@ static void test_thick_child_size(HWND parentWindow)
cls.lpszClassName = className;
SetLastError(0xdeadbeef);
success = RegisterClassA(&cls);
- ok(success,"RegisterClassA failed, error: %u\n", GetLastError());
+ ok(success,"RegisterClassA failed, error: %lu\n", GetLastError());
for(i = 0; i < NUMBER_OF_THICK_CHILD_TESTS; i++)
{
@@ -9479,13 +9479,13 @@ static void test_thick_child_size(HWND parentWindow)
SetLastError(0xdeadbeef);
childWindow = CreateWindowExA( exStyles[i], className, "", styles[i], 0, 0, 0, 0, parentWindow, 0, GetModuleHandleA(0), NULL );
- ok(childWindow != NULL, "Failed to create child window, error: %u\n", GetLastError());
+ ok(childWindow != NULL, "Failed to create child window, error: %lu\n", GetLastError());
ok(test_thick_child_got_minmax, "Got no WM_GETMINMAXINFO\n");
SetLastError(0xdeadbeef);
success = GetWindowRect(childWindow, &childRect);
- ok(success,"GetWindowRect call failed, error: %u\n", GetLastError());
+ ok(success,"GetWindowRect call failed, error: %lu\n", GetLastError());
childWidth = childRect.right - childRect.left;
childHeight = childRect.bottom - childRect.top;
@@ -9508,12 +9508,12 @@ static void test_thick_child_size(HWND parentWindow)
}
ok((childWidth == expectedWidth) && (childHeight == expectedHeight),
- "size of window (%s) is wrong: expected size %dx%d != actual size %dx%d\n",
+ "size of window (%s) is wrong: expected size %ldx%ld != actual size %ldx%ld\n",
test_thick_child_name, expectedWidth, expectedHeight, childWidth, childHeight);
SetLastError(0xdeadbeef);
success = DestroyWindow(childWindow);
- ok(success,"DestroyWindow call failed, error: %u\n", GetLastError());
+ ok(success,"DestroyWindow call failed, error: %lu\n", GetLastError());
}
ok(UnregisterClassA(className, GetModuleHandleA(NULL)),"UnregisterClass call failed\n");
}
@@ -9526,7 +9526,7 @@ static void test_handles( HWND full_hwnd )
SetLastError( 0xdeadbeef );
ret = GetWindowRect( hwnd, &rect );
- ok( ret, "GetWindowRect failed for %p err %u\n", hwnd, GetLastError() );
+ ok( ret, "GetWindowRect failed for %p err %lu\n", hwnd, GetLastError() );
#ifdef _WIN64
if ((ULONG_PTR)full_hwnd >> 32)
@@ -9535,24 +9535,24 @@ static void test_handles( HWND full_hwnd )
hwnd = (HWND)((ULONG_PTR)full_hwnd | ((ULONG_PTR)~0u << 32));
SetLastError( 0xdeadbeef );
ret = GetWindowRect( hwnd, &rect );
- ok( ret, "GetWindowRect failed for %p err %u\n", hwnd, GetLastError() );
+ ok( ret, "GetWindowRect failed for %p err %lu\n", hwnd, GetLastError() );
hwnd = (HWND)(((ULONG_PTR)full_hwnd & ~0u) | ((ULONG_PTR)0x1234 << 32));
SetLastError( 0xdeadbeef );
ret = GetWindowRect( hwnd, &rect );
- ok( ret, "GetWindowRect failed for %p err %u\n", hwnd, GetLastError() );
+ ok( ret, "GetWindowRect failed for %p err %lu\n", hwnd, GetLastError() );
hwnd = (HWND)(((ULONG_PTR)full_hwnd & 0xffff) | ((ULONG_PTR)0x9876 << 16));
SetLastError( 0xdeadbeef );
ret = GetWindowRect( hwnd, &rect );
ok( !ret, "GetWindowRect succeeded for %p\n", hwnd );
- ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %lu\n", GetLastError() );
hwnd = (HWND)(((ULONG_PTR)full_hwnd & 0xffff) | ((ULONG_PTR)0x12345678 << 16));
SetLastError( 0xdeadbeef );
ret = GetWindowRect( hwnd, &rect );
ok( !ret, "GetWindowRect succeeded for %p\n", hwnd );
- ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %lu\n", GetLastError() );
#endif
}
@@ -9574,7 +9574,7 @@ static void test_winregion(void)
SetLastError(0xdeadbeef);
ret = pGetWindowRgnBox(hwnd, NULL);
ok( ret == ERROR, "Expected ERROR, got %d\n", ret);
- ok( GetLastError() == 0xdeadbeef, "Expected , got %d\n", GetLastError());
+ ok( GetLastError() == 0xdeadbeef, "Expected , got %ld\n", GetLastError());
hrgn = CreateRectRgn(2, 3, 10, 15);
ok( hrgn != NULL, "Region creation failed\n");
@@ -9585,7 +9585,7 @@ static void test_winregion(void)
SetLastError(0xdeadbeef);
ret = pGetWindowRgnBox(hwnd, NULL);
ok( ret == ERROR, "Expected ERROR, got %d\n", ret);
- ok( GetLastError() == 0xdeadbeef, "Expected , got %d\n", GetLastError());
+ ok( GetLastError() == 0xdeadbeef, "Expected , got %ld\n", GetLastError());
SetRectEmpty(&r);
ret = pGetWindowRgnBox(hwnd, &r);
@@ -9644,7 +9644,7 @@ static void test_rtl_layout(void)
ok( r.left == 30 && r.right == 10, "wrong rect %s\n", wine_dbgstr_rect( &r ));
pt.x = pt.y = 12;
MapWindowPoints( child, parent, &pt, 1 );
- ok( pt.x == 22 && pt.y == 22, "wrong point %d,%d\n", pt.x, pt.y );
+ ok( pt.x == 22 && pt.y == 22, "wrong point %ld,%ld\n", pt.x, pt.y );
SetWindowPos( parent, 0, 0, 0, 250, 250, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE );
GetWindowRect( parent, &r );
ok( r.left == 100 && r.right == 350, "wrong rect %s\n", wine_dbgstr_rect( &r ));
@@ -9681,13 +9681,13 @@ static void test_FlashWindow(void)
hwnd = CreateWindowExA( 0, "MainWindowClass", "FlashWindow", WS_POPUP,
0, 0, 0, 0, 0, 0, 0, NULL );
- ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() );
+ ok( hwnd != 0, "CreateWindowExA error %ld\n", GetLastError() );
SetLastError( 0xdeadbeef );
ret = pFlashWindow( NULL, TRUE );
ok( !ret && (GetLastError() == ERROR_INVALID_PARAMETER ||
GetLastError() == ERROR_INVALID_WINDOW_HANDLE),
- "FlashWindow returned with %d\n", GetLastError() );
+ "FlashWindow returned with %ld\n", GetLastError() );
DestroyWindow( hwnd );
@@ -9695,7 +9695,7 @@ static void test_FlashWindow(void)
ret = pFlashWindow( hwnd, TRUE );
ok( !ret && (GetLastError() == ERROR_INVALID_PARAMETER ||
GetLastError() == ERROR_INVALID_WINDOW_HANDLE),
- "FlashWindow returned with %d\n", GetLastError() );
+ "FlashWindow returned with %ld\n", GetLastError() );
}
static void test_FlashWindowEx(void)
@@ -9712,7 +9712,7 @@ static void test_FlashWindowEx(void)
hwnd = CreateWindowExA( 0, "MainWindowClass", "FlashWindow", WS_POPUP,
0, 0, 0, 0, 0, 0, 0, NULL );
- ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() );
+ ok( hwnd != 0, "CreateWindowExA error %ld\n", GetLastError() );
finfo.cbSize = sizeof(FLASHWINFO);
finfo.dwFlags = FLASHW_TIMER;
@@ -9723,13 +9723,13 @@ static void test_FlashWindowEx(void)
ret = pFlashWindowEx(&finfo);
ok(!ret && (GetLastError() == ERROR_INVALID_PARAMETER ||
GetLastError() == ERROR_INVALID_WINDOW_HANDLE),
- "FlashWindowEx returned with %d\n", GetLastError());
+ "FlashWindowEx returned with %ld\n", GetLastError());
finfo.hwnd = hwnd;
SetLastError(0xdeadbeef);
ret = pFlashWindowEx(NULL);
ok(!ret && GetLastError() == ERROR_NOACCESS,
- "FlashWindowEx returned with %d\n", GetLastError());
+ "FlashWindowEx returned with %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ret = pFlashWindowEx(&finfo);
@@ -9754,32 +9754,32 @@ static void test_FlashWindowEx(void)
ret = pFlashWindowEx(&finfo);
ok(!ret && (GetLastError() == ERROR_INVALID_PARAMETER ||
GetLastError() == ERROR_INVALID_WINDOW_HANDLE),
- "FlashWindowEx returned with %d\n", GetLastError());
+ "FlashWindowEx returned with %ld\n", GetLastError());
ok(finfo.cbSize == sizeof(FLASHWINFO), "FlashWindowEx modified cdSize to %x\n", finfo.cbSize);
ok(finfo.hwnd == hwnd, "FlashWindowEx modified hwnd to %p\n", finfo.hwnd);
- ok(finfo.dwFlags == FLASHW_TIMER, "FlashWindowEx modified dwFlags to %x\n", finfo.dwFlags);
+ ok(finfo.dwFlags == FLASHW_TIMER, "FlashWindowEx modified dwFlags to %lx\n", finfo.dwFlags);
ok(finfo.uCount == 3, "FlashWindowEx modified uCount to %x\n", finfo.uCount);
- ok(finfo.dwTimeout == 200, "FlashWindowEx modified dwTimeout to %x\n", finfo.dwTimeout);
+ ok(finfo.dwTimeout == 200, "FlashWindowEx modified dwTimeout to %lx\n", finfo.dwTimeout);
hwnd = CreateWindowExA( 0, "MainWindowClass", "FlashWindow", WS_VISIBLE | WS_POPUPWINDOW,
0, 0, 0, 0, 0, 0, 0, NULL );
- ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() );
+ ok( hwnd != 0, "CreateWindowExA error %ld\n", GetLastError() );
finfo.hwnd = hwnd;
SetLastError(0xdeadbeef);
ret = pFlashWindowEx(NULL);
ok(!ret && GetLastError() == ERROR_NOACCESS,
- "FlashWindowEx returned with %d\n", GetLastError());
+ "FlashWindowEx returned with %ld\n", GetLastError());
SetLastError(0xdeadbeef);
prev = pFlashWindowEx(&finfo);
ok(finfo.cbSize == sizeof(FLASHWINFO), "FlashWindowEx modified cdSize to %x\n", finfo.cbSize);
ok(finfo.hwnd == hwnd, "FlashWindowEx modified hwnd to %p\n", finfo.hwnd);
- ok(finfo.dwFlags == FLASHW_TIMER, "FlashWindowEx modified dwFlags to %x\n", finfo.dwFlags);
+ ok(finfo.dwFlags == FLASHW_TIMER, "FlashWindowEx modified dwFlags to %lx\n", finfo.dwFlags);
ok(finfo.uCount == 3, "FlashWindowEx modified uCount to %x\n", finfo.uCount);
- ok(finfo.dwTimeout == 200, "FlashWindowEx modified dwTimeout to %x\n", finfo.dwTimeout);
+ ok(finfo.dwTimeout == 200, "FlashWindowEx modified dwTimeout to %lx\n", finfo.dwTimeout);
finfo.dwFlags = FLASHW_STOP;
SetLastError(0xdeadbeef);
@@ -9794,47 +9794,47 @@ static void test_FindWindowEx(void)
HWND hwnd, found;
hwnd = CreateWindowExA( 0, "MainWindowClass", "caption", WS_POPUP, 0,0,0,0, 0, 0, 0, NULL );
- ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() );
+ ok( hwnd != 0, "CreateWindowExA error %ld\n", GetLastError() );
num_gettext_msgs = 0;
found = FindWindowExA( 0, 0, "ClassThatDoesntExist", "" );
ok( found == NULL, "expected a NULL hwnd\n" );
- ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0;
found = FindWindowExA( 0, 0, "ClassThatDoesntExist", NULL );
ok( found == NULL, "expected a NULL hwnd\n" );
- ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0;
found = FindWindowExA( 0, 0, "MainWindowClass", "" );
ok( found == NULL, "expected a NULL hwnd\n" );
- ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0;
found = FindWindowExA( 0, 0, "MainWindowClass", NULL );
ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
- ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0;
found = FindWindowExA( 0, 0, "MainWindowClass", "caption" );
ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
- ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
DestroyWindow( hwnd );
hwnd = CreateWindowExA( 0, "MainWindowClass", NULL, WS_POPUP, 0,0,0,0, 0, 0, 0, NULL );
- ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() );
+ ok( hwnd != 0, "CreateWindowExA error %ld\n", GetLastError() );
num_gettext_msgs = 0;
found = FindWindowExA( 0, 0, "MainWindowClass", "" );
ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
- ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0;
found = FindWindowExA( 0, 0, "MainWindowClass", NULL );
ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
- ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
DestroyWindow( hwnd );
@@ -9850,47 +9850,47 @@ static void test_FindWindow(void)
HWND hwnd, found;
hwnd = CreateWindowExA( 0, "MainWindowClass", "caption", WS_POPUP, 0,0,0,0, 0, 0, 0, NULL );
- ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() );
+ ok( hwnd != 0, "CreateWindowExA error %ld\n", GetLastError() );
num_gettext_msgs = 0;
found = FindWindowA( "ClassThatDoesntExist", "" );
ok( found == NULL, "expected a NULL hwnd\n" );
- ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0;
found = FindWindowA( "ClassThatDoesntExist", NULL );
ok( found == NULL, "expected a NULL hwnd\n" );
- ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0;
found = FindWindowA( "MainWindowClass", "" );
ok( found == NULL, "expected a NULL hwnd\n" );
- ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0;
found = FindWindowA( "MainWindowClass", NULL );
ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
- ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0;
found = FindWindowA( "MainWindowClass", "caption" );
ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
- ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
DestroyWindow( hwnd );
hwnd = CreateWindowExA( 0, "MainWindowClass", NULL, WS_POPUP, 0,0,0,0, 0, 0, 0, NULL );
- ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() );
+ ok( hwnd != 0, "CreateWindowExA error %ld\n", GetLastError() );
num_gettext_msgs = 0;
found = FindWindowA( "MainWindowClass", "" );
ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
- ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0;
found = FindWindowA( "MainWindowClass", NULL );
ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
- ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+ ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
DestroyWindow( hwnd );
@@ -10233,7 +10233,7 @@ static void window_from_point_proc(HWND parent)
ok(got_click, "button under static window didn't get WM_LBUTTONUP\n");
ret = WaitForSingleObject(end_event, 5000);
- ok(ret == WAIT_OBJECT_0, "WaitForSingleObject returned %x\n", ret);
+ ok(ret == WAIT_OBJECT_0, "WaitForSingleObject returned %lx\n", ret);
CloseHandle(start_event);
CloseHandle(end_event);
@@ -10336,15 +10336,15 @@ static void test_map_points(void)
/* Verify window rect and client rect (they should have the same width and height) */
GetWindowRect(wnd, &window_rect);
- ok(window_rect.left == pos.x, "left is %d instead of %d\n", window_rect.left, pos.x);
- ok(window_rect.top == pos.y, "top is %d instead of %d\n", window_rect.top, pos.y);
- ok(window_rect.right == pos.x + width, "right is %d instead of %d\n", window_rect.right, pos.x + width);
- ok(window_rect.bottom == pos.y + height, "bottom is %d instead of %d\n", window_rect.bottom, pos.y + height);
+ ok(window_rect.left == pos.x, "left is %ld instead of %ld\n", window_rect.left, pos.x);
+ ok(window_rect.top == pos.y, "top is %ld instead of %ld\n", window_rect.top, pos.y);
+ ok(window_rect.right == pos.x + width, "right is %ld instead of %ld\n", window_rect.right, pos.x + width);
+ ok(window_rect.bottom == pos.y + height, "bottom is %ld instead of %ld\n", window_rect.bottom, pos.y + height);
GetClientRect(wnd, &client_rect);
- ok(client_rect.left == 0, "left is %d instead of 0\n", client_rect.left);
- ok(client_rect.top == 0, "top is %d instead of 0\n", client_rect.top);
- ok(client_rect.right == width, "right is %d instead of %d\n", client_rect.right, width);
- ok(client_rect.bottom == height, "bottom is %d instead of %d\n", client_rect.bottom, height);
+ ok(client_rect.left == 0, "left is %ld instead of 0\n", client_rect.left);
+ ok(client_rect.top == 0, "top is %ld instead of 0\n", client_rect.top);
+ ok(client_rect.right == width, "right is %ld instead of %d\n", client_rect.right, width);
+ ok(client_rect.bottom == height, "bottom is %ld instead of %d\n", client_rect.bottom, height);
/* Test MapWindowPoints */
@@ -10354,20 +10354,20 @@ static void test_map_points(void)
n = MapWindowPoints(NULL, NULL, NULL, 0);
err = GetLastError();
ok(n == 0, "Got %d, expected %d\n", n, 0);
- ok(err == 0xdeadbeef, "Got %x, expected %x\n", err, 0xdeadbeef);
+ ok(err == 0xdeadbeef, "Got %lx, expected %x\n", err, 0xdeadbeef);
SetLastError(0xdeadbeef);
n = MapWindowPoints(wnd, wnd, NULL, 0);
err = GetLastError();
ok(n == 0, "Got %d, expected %d\n", n, 0);
- ok(err == 0xdeadbeef, "Got %x, expected %x\n", err, 0xdeadbeef);
+ ok(err == 0xdeadbeef, "Got %lx, expected %x\n", err, 0xdeadbeef);
n = MapWindowPoints(wnd, NULL, NULL, 0);
- ok(n == MAKELONG(window_rect.left, window_rect.top), "Got %x, expected %x\n",
+ ok(n == MAKELONG(window_rect.left, window_rect.top), "Got %x, expected %lx\n",
n, MAKELONG(window_rect.left, window_rect.top));
n = MapWindowPoints(NULL, wnd, NULL, 0);
- ok(n == MAKELONG(-window_rect.left, -window_rect.top), "Got %x, expected %x\n",
+ ok(n == MAKELONG(-window_rect.left, -window_rect.top), "Got %x, expected %lx\n",
n, MAKELONG(-window_rect.left, -window_rect.top));
SetLastError(0xdeadbeef);
@@ -10375,69 +10375,69 @@ static void test_map_points(void)
n = MapWindowPoints(dwnd, NULL, &p, 1);
err = GetLastError();
ok(n == 0, "Got %d, expected %d\n", n, 0);
- ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100);
- ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
+ ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100);
+ ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
SetLastError(0xdeadbeef);
p.x = p.y = 100;
n = MapWindowPoints(dwnd, wnd, &p, 1);
err = GetLastError();
ok(n == 0, "Got %d, expected %d\n", n, 0);
- ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100);
- ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
+ ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100);
+ ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
SetLastError(0xdeadbeef);
p.x = p.y = 100;
n = MapWindowPoints(NULL, dwnd, &p, 1);
err = GetLastError();
ok(n == 0, "Got %d, expected %d\n", n, 0);
- ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100);
- ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
+ ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100);
+ ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
SetLastError(0xdeadbeef);
p.x = p.y = 100;
n = MapWindowPoints(wnd, dwnd, &p, 1);
err = GetLastError();
ok(n == 0, "Got %d, expected %d\n", n, 0);
- ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100);
- ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
+ ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100);
+ ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
SetLastError(0xdeadbeef);
p.x = p.y = 100;
n = MapWindowPoints(dwnd, dwnd, &p, 1);
err = GetLastError();
ok(n == 0, "Got %d, expected %d\n", n, 0);
- ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100);
- ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
+ ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100);
+ ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
SetLastError(0xdeadbeef);
p.x = p.y = 100;
n = MapWindowPoints(NULL, NULL, &p, 1);
err = GetLastError();
ok(n == 0, "Got %d, expected %d\n", n, 0);
- ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100);
- ok(err == 0xdeadbeef, "Got %x, expected %x\n", err, 0xdeadbeef);
+ ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100);
+ ok(err == 0xdeadbeef, "Got %lx, expected %x\n", err, 0xdeadbeef);
SetLastError(0xdeadbeef);
p.x = p.y = 100;
n = MapWindowPoints(wnd, wnd, &p, 1);
err = GetLastError();
ok(n == 0, "Got %d, expected %d\n", n, 0);
- ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100);
- ok(err == 0xdeadbeef, "Got %x, expected %x\n", err, 0xdeadbeef);
+ ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100);
+ ok(err == 0xdeadbeef, "Got %lx, expected %x\n", err, 0xdeadbeef);
p.x = p.y = 100;
n = MapWindowPoints(wnd, NULL, &p, 1);
- ok(n == MAKELONG(window_rect.left, window_rect.top), "Got %x, expected %x\n",
+ ok(n == MAKELONG(window_rect.left, window_rect.top), "Got %x, expected %lx\n",
n, MAKELONG(window_rect.left, window_rect.top));
- ok((p.x == (window_rect.left + 100)) && (p.y == (window_rect.top + 100)), "Failed got (%d, %d), expected (%d, %d)\n",
+ ok((p.x == (window_rect.left + 100)) && (p.y == (window_rect.top + 100)), "Failed got (%ld, %ld), expected (%ld, %ld)\n",
p.x, p.y, window_rect.left + 100, window_rect.top + 100);
p.x = p.y = 100;
n = MapWindowPoints(NULL, wnd, &p, 1);
- ok(n == MAKELONG(-window_rect.left, -window_rect.top), "Got %x, expected %x\n",
+ ok(n == MAKELONG(-window_rect.left, -window_rect.top), "Got %x, expected %lx\n",
n, MAKELONG(-window_rect.left, -window_rect.top));
- ok((p.x == (-window_rect.left + 100)) && (p.y == (-window_rect.top + 100)), "Failed got (%d, %d), expected (%d, %d)\n",
+ ok((p.x == (-window_rect.left + 100)) && (p.y == (-window_rect.top + 100)), "Failed got (%ld, %ld), expected (%ld, %ld)\n",
p.x, p.y, -window_rect.left + 100, -window_rect.top + 100);
SetLastError(0xdeadbeef);
@@ -10445,16 +10445,16 @@ static void test_map_points(void)
n = MapWindowPoints(wnd0, NULL, &p, 1);
err = GetLastError();
ok(n == 0, "Got %x, expected 0\n", n);
- ok((p.x == 0) && (p.y == 0), "Failed got (%d, %d), expected (0, 0)\n", p.x, p.y);
- ok(err == 0xdeadbeef, "Got %x, expected %x\n", err, 0xdeadbeef);
+ ok((p.x == 0) && (p.y == 0), "Failed got (%ld, %ld), expected (0, 0)\n", p.x, p.y);
+ ok(err == 0xdeadbeef, "Got %lx, expected %x\n", err, 0xdeadbeef);
SetLastError(0xdeadbeef);
p.x = p.y = 0;
n = MapWindowPoints(NULL, wnd0, &p, 1);
err = GetLastError();
ok(n == 0, "Got %x, expected 0\n", n);
- ok((p.x == 0) && (p.y == 0), "Failed got (%d, %d), expected (0, 0)\n", p.x, p.y);
- ok(err == 0xdeadbeef, "Got %x, expected %x\n", err, 0xdeadbeef);
+ ok((p.x == 0) && (p.y == 0), "Failed got (%ld, %ld), expected (0, 0)\n", p.x, p.y);
+ ok(err == 0xdeadbeef, "Got %lx, expected %x\n", err, 0xdeadbeef);
/* Test ClientToScreen */
@@ -10464,34 +10464,34 @@ static void test_map_points(void)
ret = ClientToScreen(NULL, NULL);
err = GetLastError();
ok(!ret, "Should fail\n");
- ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
+ ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
SetLastError(0xdeadbeef);
p.x = p.y = 100;
ret = ClientToScreen(NULL, &p);
err = GetLastError();
ok(!ret, "Should fail\n");
- ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100);
- ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
+ ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100);
+ ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
SetLastError(0xdeadbeef);
p.x = p.y = 100;
ret = ClientToScreen(dwnd, &p);
err = GetLastError();
ok(!ret, "Should fail\n");
- ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100);
- ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
+ ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100);
+ ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
p.x = p.y = 100;
ret = ClientToScreen(wnd, &p);
- ok(ret, "Failed with error %u\n", GetLastError());
- ok((p.x == (window_rect.left + 100)) && (p.y == (window_rect.top + 100)), "Failed got (%d, %d), expected (%d, %d)\n",
+ ok(ret, "Failed with error %lu\n", GetLastError());
+ ok((p.x == (window_rect.left + 100)) && (p.y == (window_rect.top + 100)), "Failed got (%ld, %ld), expected (%ld, %ld)\n",
p.x, p.y, window_rect.left + 100, window_rect.top + 100);
p.x = p.y = 0;
ret = ClientToScreen(wnd0, &p);
- ok(ret, "Failed with error %u\n", GetLastError());
- ok((p.x == 0) && (p.y == 0), "Failed got (%d, %d), expected (0, 0)\n", p.x, p.y);
+ ok(ret, "Failed with error %lu\n", GetLastError());
+ ok((p.x == 0) && (p.y == 0), "Failed got (%ld, %ld), expected (0, 0)\n", p.x, p.y);
/* Test ScreenToClient */
@@ -10501,34 +10501,34 @@ static void test_map_points(void)
ret = ScreenToClient(NULL, NULL);
err = GetLastError();
ok(!ret, "Should fail\n");
- ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
+ ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
SetLastError(0xdeadbeef);
p.x = p.y = 100;
ret = ScreenToClient(NULL, &p);
err = GetLastError();
ok(!ret, "Should fail\n");
- ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100);
- ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
+ ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100);
+ ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
SetLastError(0xdeadbeef);
p.x = p.y = 100;
ret = ScreenToClient(dwnd, &p);
err = GetLastError();
ok(!ret, "Should fail\n");
- ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100);
- ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
+ ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100);
+ ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
p.x = p.y = 100;
ret = ScreenToClient(wnd, &p);
- ok(ret, "Failed with error %u\n", GetLastError());
- ok((p.x == (-window_rect.left + 100)) && (p.y == (-window_rect.top + 100)), "Failed got(%d, %d), expected (%d, %d)\n",
+ ok(ret, "Failed with error %lu\n", GetLastError());
+ ok((p.x == (-window_rect.left + 100)) && (p.y == (-window_rect.top + 100)), "Failed got(%ld, %ld), expected (%ld, %ld)\n",
p.x, p.y, -window_rect.left + 100, -window_rect.top + 100);
p.x = p.y = 0;
ret = ScreenToClient(wnd0, &p);
- ok(ret, "Failed with error %u\n", GetLastError());
- ok((p.x == 0) && (p.y == 0), "Failed got (%d, %d), expected (0, 0)\n", p.x, p.y);
+ ok(ret, "Failed with error %lu\n", GetLastError());
+ ok((p.x == 0) && (p.y == 0), "Failed got (%ld, %ld), expected (0, 0)\n", p.x, p.y);
DestroyWindow(wnd);
DestroyWindow(wnd0);
@@ -10668,7 +10668,7 @@ static LRESULT WINAPI smresult_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARA
/* Send another message while we have a reply queued for the current one. */
res = SendMessageA(data->thread_hwnd, WM_APP+2, 0, lparam);
- ok(res == 0x449b0190, "unexpected result %lx\n", res);
+ ok(res == 0x449b0190, "unexpected result %Ix\n", res);
return 0;
}
@@ -10766,12 +10766,12 @@ static void test_smresult(void)
100, 100, 200, 200, 0, 0, 0, NULL);
hThread = CreateThread(NULL, 0, smresult_thread_proc, &data, 0, &tid);
- ok(hThread != NULL, "CreateThread failed, error %d\n", GetLastError());
+ ok(hThread != NULL, "CreateThread failed, error %ld\n", GetLastError());
ok(WaitForSingleObject(data.thread_started, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
res = SendMessageA(data.thread_hwnd, WM_APP, 0, (LPARAM)&data);
- ok(res == 0x240408ea, "unexpected result %lx\n", res);
+ ok(res == 0x240408ea, "unexpected result %Ix\n", res);
SendMessageA(data.thread_hwnd, WM_CLOSE, 0, 0);
@@ -10799,42 +10799,42 @@ static void test_GetMessagePos(void)
SetCursorPos(120, 140);
flush_events(TRUE);
pos = GetMessagePos();
- ok(pos == MAKELONG(120, 140), "pos = %08x\n", pos);
+ ok(pos == MAKELONG(120, 140), "pos = %08lx\n", pos);
SetCursorPos(340, 320);
pos = GetMessagePos();
- ok(pos == MAKELONG(120, 140), "pos = %08x\n", pos);
+ ok(pos == MAKELONG(120, 140), "pos = %08lx\n", pos);
SendMessageW(button, WM_APP, 0, 0);
pos = GetMessagePos();
- ok(pos == MAKELONG(120, 140), "pos = %08x\n", pos);
+ ok(pos == MAKELONG(120, 140), "pos = %08lx\n", pos);
PostMessageA(button, WM_APP, 0, 0);
GetMessageA(&msg, button, 0, 0);
ok(msg.message == WM_APP, "msg.message = %x\n", msg.message);
pos = GetMessagePos();
- ok(pos == MAKELONG(340, 320), "pos = %08x\n", pos);
+ ok(pos == MAKELONG(340, 320), "pos = %08lx\n", pos);
PostMessageA(button, WM_APP, 0, 0);
SetCursorPos(350, 330);
GetMessageA(&msg, button, 0, 0);
ok(msg.message == WM_APP, "msg.message = %x\n", msg.message);
pos = GetMessagePos();
- ok(pos == MAKELONG(340, 320), "pos = %08x\n", pos);
+ ok(pos == MAKELONG(340, 320), "pos = %08lx\n", pos);
PostMessageA(button, WM_APP, 0, 0);
SetCursorPos(320, 340);
PostMessageA(button, WM_APP+1, 0, 0);
pos = GetMessagePos();
- ok(pos == MAKELONG(340, 320), "pos = %08x\n", pos);
+ ok(pos == MAKELONG(340, 320), "pos = %08lx\n", pos);
GetMessageA(&msg, button, 0, 0);
ok(msg.message == WM_APP, "msg.message = %x\n", msg.message);
pos = GetMessagePos();
- ok(pos == MAKELONG(350, 330), "pos = %08x\n", pos);
+ ok(pos == MAKELONG(350, 330), "pos = %08lx\n", pos);
GetMessageA(&msg, button, 0, 0);
ok(msg.message == WM_APP+1, "msg.message = %x\n", msg.message);
pos = GetMessagePos();
- ok(pos == MAKELONG(320, 340), "pos = %08x\n", pos);
+ ok(pos == MAKELONG(320, 340), "pos = %08lx\n", pos);
SetTimer(button, 1, 250, NULL);
SetCursorPos(330, 350);
@@ -10846,7 +10846,7 @@ static void test_GetMessagePos(void)
}
ok(msg.message == WM_TIMER, "msg.message = %x\n", msg.message);
pos = GetMessagePos();
- ok(pos == MAKELONG(330, 350), "pos = %08x\n", pos);
+ ok(pos == MAKELONG(330, 350), "pos = %08lx\n", pos);
KillTimer(button, 1);
DestroyWindow(button);
@@ -11085,7 +11085,7 @@ static LRESULT WINAPI winproc_convA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM l
{
const char *text = (const char*)lparam;
- ok(!wparam, "wparam = %08lx\n", wparam);
+ ok(!wparam, "wparam = %08Ix\n", wparam);
ok(!strcmp(text, "text"), "WM_SETTEXT lparam = %s\n", text);
return 1;
}
@@ -11099,7 +11099,7 @@ static LRESULT WINAPI winproc_convW(HWND hwnd, UINT msg, WPARAM wparam, LPARAM l
{
const WCHAR *text = (const WCHAR*)lparam;
- ok(!wparam, "wparam = %08lx\n", wparam);
+ ok(!wparam, "wparam = %08Ix\n", wparam);
ok(!lstrcmpW(text, textW), "WM_SETTEXT lparam = %s\n", wine_dbgstr_w(text));
return 1;
}
@@ -11122,10 +11122,10 @@ static void test_winproc_handles(const char *argv0)
wnd_classA.lpszClassName = "winproc_test";
wnd_classA.lpfnWndProc = winproc;
ret = RegisterClassA(&wnd_classA);
- ok(ret, "RegisterClass failed with error %d\n", GetLastError());
+ ok(ret, "RegisterClass failed with error %ld\n", GetLastError());
ret = GetClassInfoW(hinst, winproc_testW, &wnd_classW);
- ok(ret, "GetClassInfoW failed with error %d\n", GetLastError());
+ ok(ret, "GetClassInfoW failed with error %ld\n", GetLastError());
ok(wnd_classA.lpfnWndProc != wnd_classW.lpfnWndProc,
"winproc pointers should not be identical\n");
@@ -11137,7 +11137,7 @@ static void test_winproc_handles(const char *argv0)
ok(count == 1, "winproc should be called once (%d)\n", count);
ret = UnregisterClassW(winproc_testW, hinst);
- ok(ret, "UnregisterClass failed with error %d\n", GetLastError());
+ ok(ret, "UnregisterClass failed with error %ld\n", GetLastError());
/* crashes on 64-bit windows because lpfnWndProc handle is already freed */
if (sizeof(void*) == 4)
@@ -11184,12 +11184,12 @@ static void test_winproc_limit(void)
ok(i != 0xffff, "unable to run out of winproc slots\n");
ret = SetWindowLongPtrA(hwnd, GWLP_WNDPROC, (LONG_PTR)winproc_convA);
- ok(ret, "SetWindowLongPtr failed with error %d\n", GetLastError());
+ ok(ret, "SetWindowLongPtr failed with error %ld\n", GetLastError());
ok(SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)"text"), "WM_SETTEXT failed\n");
ok(SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)textW), "WM_SETTEXT with conversion failed\n");
ret = SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (LONG_PTR)winproc_convW);
- ok(ret, "SetWindowLongPtr failed with error %d\n", GetLastError());
+ ok(ret, "SetWindowLongPtr failed with error %ld\n", GetLastError());
ok(SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)"text"), "WM_SETTEXT failed\n");
ok(SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)textW), "WM_SETTEXT with conversion failed\n");
@@ -11231,21 +11231,21 @@ static void test_deferwindowpos(void)
hdwp2 = DeferWindowPos(NULL, NULL, NULL, 0, 0, 10, 10, 0);
todo_wine
ok(hdwp2 == NULL && ((GetLastError() == ERROR_INVALID_DWP_HANDLE) ||
- broken(GetLastError() == ERROR_INVALID_WINDOW_HANDLE) /* before win8 */), "got %p, error %d\n", hdwp2, GetLastError());
+ broken(GetLastError() == ERROR_INVALID_WINDOW_HANDLE) /* before win8 */), "got %p, error %ld\n", hdwp2, GetLastError());
hdwp2 = DeferWindowPos((HDWP)0xdead, GetDesktopWindow(), NULL, 0, 0, 10, 10, 0);
todo_wine
ok(hdwp2 == NULL && ((GetLastError() == ERROR_INVALID_DWP_HANDLE) ||
- broken(GetLastError() == ERROR_INVALID_WINDOW_HANDLE) /* before win8 */), "got %p, error %d\n", hdwp2, GetLastError());
+ broken(GetLastError() == ERROR_INVALID_WINDOW_HANDLE) /* before win8 */), "got %p, error %ld\n", hdwp2, GetLastError());
hdwp2 = DeferWindowPos(hdwp, NULL, NULL, 0, 0, 10, 10, 0);
- ok(hdwp2 == NULL && GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got %p, error %d\n", hdwp2, GetLastError());
+ ok(hdwp2 == NULL && GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got %p, error %ld\n", hdwp2, GetLastError());
hdwp2 = DeferWindowPos(hdwp, GetDesktopWindow(), NULL, 0, 0, 10, 10, 0);
- ok(hdwp2 == NULL && GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got %p, error %d\n", hdwp2, GetLastError());
+ ok(hdwp2 == NULL && GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got %p, error %ld\n", hdwp2, GetLastError());
hdwp2 = DeferWindowPos(hdwp, (HWND)0xdead, NULL, 0, 0, 10, 10, 0);
- ok(hdwp2 == NULL && GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got %p, error %d\n", hdwp2, GetLastError());
+ ok(hdwp2 == NULL && GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got %p, error %ld\n", hdwp2, GetLastError());
ret = EndDeferWindowPos(hdwp);
ok(ret, "got %d\n", ret);
@@ -11254,7 +11254,7 @@ static void test_deferwindowpos(void)
hwnd = create_tool_window(WS_POPUP, 0);
hdwp2 = DeferWindowPos(hdwp, hwnd, NULL, 0, 0, 10, 10, 0);
- ok(hdwp2 != NULL, "got %p, error %d\n", hdwp2, GetLastError());
+ ok(hdwp2 != NULL, "got %p, error %ld\n", hdwp2, GetLastError());
DestroyWindow(hwnd);
ret = EndDeferWindowPos(hdwp);
@@ -11309,7 +11309,7 @@ static void test_LockWindowUpdate(HWND parent)
COLORREF c = GetPixel(hdc, p.x, p.y); \
COLORREF e = tests[i].expect_valid ? (c_valid) : (c_invalid); \
todo_wine_if(!tests[i].expect_valid) \
- ok(c == e, "%u: GetPixel: got %08x, expected %08x\n", i, c, e); \
+ ok(c == e, "%u: GetPixel: got %08lx, expected %08lx\n", i, c, e); \
} while (0)
SetPixel(hdc, p.x, p.y, c1);
@@ -11563,13 +11563,13 @@ static void test_desktop( void )
{
SetLastError( 0xdeadbeef );
result = GetWindowLongPtrW( desktop, tests[i].offset );
- ok( result == tests[i].expect, "offset %d, got %08lx expect %08lx\n",
+ ok( result == tests[i].expect, "offset %d, got %08Ix expect %08Ix\n",
tests[i].offset, result, tests[i].expect );
if (tests[i].error)
- ok( GetLastError() == tests[i].error, "offset %d: error %d expect %d\n",
+ ok( GetLastError() == tests[i].error, "offset %d: error %ld expect %ld\n",
tests[i].offset, GetLastError(), tests[i].error );
else
- ok( GetLastError() == 0xdeadbeef, "offset %d: error %d expect unchanged\n",
+ ok( GetLastError() == 0xdeadbeef, "offset %d: error %ld expect unchanged\n",
tests[i].offset, GetLastError() );
}
}
@@ -11611,7 +11611,7 @@ static void test_topmost(void)
owner = create_tool_window(WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX |
WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE, 0);
- ok(owner != 0, "Failed to create owner window (%d)\n", GetLastError());
+ ok(owner != 0, "Failed to create owner window (%ld)\n", GetLastError());
/* Give current thread foreground state otherwise the tests may fail. */
if (!SetForegroundWindow(owner))
@@ -11623,10 +11623,10 @@ static void test_topmost(void)
hwnd = create_tool_window(WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX |
WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE, owner);
- ok(hwnd != 0, "Failed to create popup window (%d)\n", GetLastError());
+ ok(hwnd != 0, "Failed to create popup window (%ld)\n", GetLastError());
hwnd2 = create_tool_window(WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX |
WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE, owner);
- ok(hwnd2 != 0, "Failed to create popup window (%d)\n", GetLastError());
+ ok(hwnd2 != 0, "Failed to create popup window (%ld)\n", GetLastError());
flush_events( TRUE );
@@ -11733,11 +11733,11 @@ static void test_topmost(void)
reset_window_state(state, ARRAY_SIZE(state));
hwnd_child2 = create_tool_window(WS_VISIBLE|WS_POPUP, hwnd);
- ok(hwnd_child2 != 0, "Failed to create popup window (%d)\n", GetLastError());
+ ok(hwnd_child2 != 0, "Failed to create popup window (%ld)\n", GetLastError());
hwnd_child = create_tool_window(WS_VISIBLE|WS_POPUP, hwnd);
- ok(hwnd_child != 0, "Failed to create popup window (%d)\n", GetLastError());
+ ok(hwnd_child != 0, "Failed to create popup window (%ld)\n", GetLastError());
hwnd_grandchild = create_tool_window(WS_VISIBLE|WS_POPUP, hwnd_child);
- ok(hwnd_grandchild != 0, "Failed to create popup window (%d)\n", GetLastError());
+ ok(hwnd_grandchild != 0, "Failed to create popup window (%ld)\n", GetLastError());
flush_events( TRUE );
@@ -11978,70 +11978,70 @@ static void test_display_affinity( HWND win )
ret = pGetWindowDisplayAffinity(NULL, NULL);
ok(!ret, "GetWindowDisplayAffinity succeeded\n");
- ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "Expected ERROR_INVALID_WINDOW_HANDLE, got %u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "Expected ERROR_INVALID_WINDOW_HANDLE, got %lu\n", GetLastError());
ret = pGetWindowDisplayAffinity(NULL, &affinity);
ok(!ret, "GetWindowDisplayAffinity succeeded\n");
- ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "Expected ERROR_INVALID_WINDOW_HANDLE, got %u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "Expected ERROR_INVALID_WINDOW_HANDLE, got %lu\n", GetLastError());
ret = pGetWindowDisplayAffinity(win, NULL);
ok(!ret, "GetWindowDisplayAffinity succeeded\n");
- ok(GetLastError() == ERROR_NOACCESS, "Expected ERROR_NOACCESS, got %u\n", GetLastError());
+ ok(GetLastError() == ERROR_NOACCESS, "Expected ERROR_NOACCESS, got %lu\n", GetLastError());
styleex = GetWindowLongW(win, GWL_EXSTYLE);
SetWindowLongW(win, GWL_EXSTYLE, styleex & ~WS_EX_LAYERED);
affinity = 0xdeadbeef;
ret = pGetWindowDisplayAffinity(win, &affinity);
- ok(ret, "GetWindowDisplayAffinity failed with %u\n", GetLastError());
- ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%x\n", affinity);
+ ok(ret, "GetWindowDisplayAffinity failed with %lu\n", GetLastError());
+ ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%lx\n", affinity);
/* Windows 7 fails with ERROR_NOT_ENOUGH_MEMORY when dwm compositing is disabled */
ret = pSetWindowDisplayAffinity(win, WDA_MONITOR);
ok(ret || GetLastError() == ERROR_NOT_ENOUGH_MEMORY,
- "SetWindowDisplayAffinity failed with %u\n", GetLastError());
+ "SetWindowDisplayAffinity failed with %lu\n", GetLastError());
dwm = ret;
affinity = 0xdeadbeef;
ret = pGetWindowDisplayAffinity(win, &affinity);
- ok(ret, "GetWindowDisplayAffinity failed with %u\n", GetLastError());
- if (dwm) ok(affinity == WDA_MONITOR, "Expected WDA_MONITOR, got 0x%x\n", affinity);
- else ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%x\n", affinity);
+ ok(ret, "GetWindowDisplayAffinity failed with %lu\n", GetLastError());
+ if (dwm) ok(affinity == WDA_MONITOR, "Expected WDA_MONITOR, got 0x%lx\n", affinity);
+ else ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%lx\n", affinity);
ret = pSetWindowDisplayAffinity(win, WDA_NONE);
ok(ret || GetLastError() == ERROR_NOT_ENOUGH_MEMORY,
- "SetWindowDisplayAffinity failed with %u\n", GetLastError());
+ "SetWindowDisplayAffinity failed with %lu\n", GetLastError());
affinity = 0xdeadbeef;
ret = pGetWindowDisplayAffinity(win, &affinity);
- ok(ret, "GetWindowDisplayAffinity failed with %u\n", GetLastError());
- ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%x\n", affinity);
+ ok(ret, "GetWindowDisplayAffinity failed with %lu\n", GetLastError());
+ ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%lx\n", affinity);
SetWindowLongW(win, GWL_EXSTYLE, styleex | WS_EX_LAYERED);
affinity = 0xdeadbeef;
ret = pGetWindowDisplayAffinity(win, &affinity);
- ok(ret, "GetWindowDisplayAffinity failed with %u\n", GetLastError());
- ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%x\n", affinity);
+ ok(ret, "GetWindowDisplayAffinity failed with %lu\n", GetLastError());
+ ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%lx\n", affinity);
ret = pSetWindowDisplayAffinity(win, WDA_MONITOR);
ok(ret || GetLastError() == ERROR_NOT_ENOUGH_MEMORY,
- "SetWindowDisplayAffinity failed with %u\n", GetLastError());
+ "SetWindowDisplayAffinity failed with %lu\n", GetLastError());
affinity = 0xdeadbeef;
ret = pGetWindowDisplayAffinity(win, &affinity);
- ok(ret, "GetWindowDisplayAffinity failed with %u\n", GetLastError());
- if (dwm) ok(affinity == WDA_MONITOR, "Expected WDA_MONITOR, got 0x%x\n", affinity);
- else ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%x\n", affinity);
+ ok(ret, "GetWindowDisplayAffinity failed with %lu\n", GetLastError());
+ if (dwm) ok(affinity == WDA_MONITOR, "Expected WDA_MONITOR, got 0x%lx\n", affinity);
+ else ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%lx\n", affinity);
ret = pSetWindowDisplayAffinity(win, WDA_NONE);
ok(ret || GetLastError() == ERROR_NOT_ENOUGH_MEMORY,
- "SetWindowDisplayAffinity failed with %u\n", GetLastError());
+ "SetWindowDisplayAffinity failed with %lu\n", GetLastError());
affinity = 0xdeadbeef;
ret = pGetWindowDisplayAffinity(win, &affinity);
- ok(ret, "GetWindowDisplayAffinity failed with %u\n", GetLastError());
- ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%x\n", affinity);
+ ok(ret, "GetWindowDisplayAffinity failed with %lu\n", GetLastError());
+ ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%lx\n", affinity);
SetWindowLongW(win, GWL_EXSTYLE, styleex);
}
@@ -12109,7 +12109,7 @@ static DWORD CALLBACK destroy_thread1(void *user)
destroy_data.thread1_wnd = CreateWindowExA(0, "destroy_test_thread1",
"destroy test thread", WS_CHILD, 100, 100, 100, 100,
destroy_data.main_wnd, 0, GetModuleHandleA(NULL), NULL);
- ok(destroy_data.thread1_wnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
+ ok(destroy_data.thread1_wnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
PostThreadMessageW(destroy_data.main_tid, WM_USER, 0, 0);
while (GetMessageA(&msg, 0, 0, 0))
@@ -12130,7 +12130,7 @@ static DWORD CALLBACK destroy_thread2(void *user)
destroy_data.thread2_wnd = CreateWindowExA(0, "destroy_test_thread2",
"destroy test thread", WS_CHILD, 100, 100, 100, 100,
destroy_data.main_wnd, 0, GetModuleHandleA(NULL), NULL);
- ok(destroy_data.thread2_wnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
+ ok(destroy_data.thread2_wnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
PostThreadMessageW(destroy_data.main_tid, WM_USER + 1, 0, 0);
Sleep( 100 );
@@ -12160,22 +12160,22 @@ static void test_destroy_quit(void)
wnd_classA.lpszClassName = "destroy_test_main";
wnd_classA.lpfnWndProc = destroy_main_wndproc;
ret = RegisterClassA(&wnd_classA);
- ok(ret, "RegisterClass failed with error %d\n", GetLastError());
+ ok(ret, "RegisterClass failed with error %ld\n", GetLastError());
wnd_classA.lpszClassName = "destroy_test_thread1";
wnd_classA.lpfnWndProc = destroy_thread1_wndproc;
ret = RegisterClassA(&wnd_classA);
- ok(ret, "RegisterClass failed with error %d\n", GetLastError());
+ ok(ret, "RegisterClass failed with error %ld\n", GetLastError());
wnd_classA.lpszClassName = "destroy_test_thread2";
wnd_classA.lpfnWndProc = destroy_thread2_wndproc;
ret = RegisterClassA(&wnd_classA);
- ok(ret, "RegisterClass failed with error %d\n", GetLastError());
+ ok(ret, "RegisterClass failed with error %ld\n", GetLastError());
destroy_data.main_wnd = CreateWindowExA(0, "destroy_test_main",
"destroy test main", WS_OVERLAPPED | WS_CAPTION, 100, 100, 100, 100,
0, 0, GetModuleHandleA(NULL), NULL);
- ok(destroy_data.main_wnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
+ ok(destroy_data.main_wnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
if (!destroy_data.main_wnd)
{
CloseHandle(destroy_data.evt);
@@ -12243,141 +12243,141 @@ static void test_window_placement(void)
hwnd = CreateWindowA("MainWindowClass", "wp", WS_OVERLAPPEDWINDOW,
orig.left, orig.top, orig.right - orig.left, orig.bottom - orig.top, 0, 0, 0, 0);
- ok(!!hwnd, "failed to create window, error %u\n", GetLastError());
+ ok(!!hwnd, "failed to create window, error %lu\n", GetLastError());
mon_info.cbSize = sizeof(mon_info);
GetMonitorInfoW(MonitorFromWindow(hwnd, MONITOR_DEFAULTTOPRIMARY), &mon_info);
work_rect = mon_info.rcWork;
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to get window placement, error %u\n", GetLastError());
+ ok(ret, "failed to get window placement, error %lu\n", GetLastError());
ok(wp.showCmd == SW_SHOWNORMAL, "got show cmd %u\n", wp.showCmd);
ok(wp.ptMinPosition.x == -1 && wp.ptMinPosition.y == -1,
- "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
- "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n",
wine_dbgstr_rect(&wp.rcNormalPosition));
ShowWindow(hwnd, SW_MINIMIZE);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to get window placement, error %u\n", GetLastError());
+ ok(ret, "failed to get window placement, error %lu\n", GetLastError());
ok(!wp.flags, "got flags %#x\n", wp.flags);
ok(wp.showCmd == SW_SHOWMINIMIZED, "got show cmd %u\n", wp.showCmd);
ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000,
- "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
- "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n",
wine_dbgstr_rect(&wp.rcNormalPosition));
ShowWindow(hwnd, SW_RESTORE);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to get window placement, error %u\n", GetLastError());
+ ok(ret, "failed to get window placement, error %lu\n", GetLastError());
ok(wp.showCmd == SW_SHOWNORMAL, "got show cmd %u\n", wp.showCmd);
ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000,
- "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
- "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n",
wine_dbgstr_rect(&wp.rcNormalPosition));
ShowWindow(hwnd, SW_MAXIMIZE);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to get window placement, error %u\n", GetLastError());
+ ok(ret, "failed to get window placement, error %lu\n", GetLastError());
ok(wp.showCmd == SW_SHOWMAXIMIZED, "got show cmd %u\n", wp.showCmd);
ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000,
- "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
- "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n",
wine_dbgstr_rect(&wp.rcNormalPosition));
SetWindowPos(hwnd, 0, 100, 100, 100, 100, SWP_NOZORDER | SWP_NOACTIVATE);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to get window placement, error %u\n", GetLastError());
+ ok(ret, "failed to get window placement, error %lu\n", GetLastError());
ok(wp.showCmd == SW_SHOWMAXIMIZED, "got show cmd %u\n", wp.showCmd);
ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000,
- "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == 100 && wp.ptMaxPosition.y == 100,
- "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n",
wine_dbgstr_rect(&wp.rcNormalPosition));
SetWindowPos(hwnd, 0, work_rect.left, work_rect.top, work_rect.right - work_rect.left,
work_rect.bottom - work_rect.top, SWP_NOZORDER | SWP_NOACTIVATE);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to get window placement, error %u\n", GetLastError());
+ ok(ret, "failed to get window placement, error %lu\n", GetLastError());
ok(wp.showCmd == SW_SHOWMAXIMIZED, "got show cmd %u\n", wp.showCmd);
ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000,
- "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
- "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n",
wine_dbgstr_rect(&wp.rcNormalPosition));
SetWindowPos(hwnd, 0, work_rect.left, work_rect.top, work_rect.right - work_rect.left - 1,
work_rect.bottom - work_rect.top, SWP_NOZORDER | SWP_NOACTIVATE);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to get window placement, error %u\n", GetLastError());
+ ok(ret, "failed to get window placement, error %lu\n", GetLastError());
ok(wp.showCmd == SW_SHOWMAXIMIZED, "got show cmd %u\n", wp.showCmd);
ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000,
- "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == work_rect.left && wp.ptMaxPosition.y == work_rect.top,
- "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n",
wine_dbgstr_rect(&wp.rcNormalPosition));
SetWindowPos(hwnd, 0, work_rect.left, work_rect.top, work_rect.right - work_rect.left,
work_rect.bottom - work_rect.top - 1, SWP_NOZORDER | SWP_NOACTIVATE);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to get window placement, error %u\n", GetLastError());
+ ok(ret, "failed to get window placement, error %lu\n", GetLastError());
ok(wp.showCmd == SW_SHOWMAXIMIZED, "got show cmd %u\n", wp.showCmd);
ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000,
- "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == work_rect.left && wp.ptMaxPosition.y == work_rect.top,
- "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n",
wine_dbgstr_rect(&wp.rcNormalPosition));
ShowWindow(hwnd, SW_MINIMIZE);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to get window placement, error %u\n", GetLastError());
+ ok(ret, "failed to get window placement, error %lu\n", GetLastError());
ok(wp.flags == WPF_RESTORETOMAXIMIZED, "got flags %#x\n", wp.flags);
ok(wp.showCmd == SW_SHOWMINIMIZED, "got show cmd %u\n", wp.showCmd);
ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000,
- "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
- "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n",
wine_dbgstr_rect(&wp.rcNormalPosition));
ShowWindow(hwnd, SW_RESTORE);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to get window placement, error %u\n", GetLastError());
+ ok(ret, "failed to get window placement, error %lu\n", GetLastError());
ok(wp.showCmd == SW_SHOWMAXIMIZED, "got show cmd %u\n", wp.showCmd);
ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000,
- "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
- "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n",
wine_dbgstr_rect(&wp.rcNormalPosition));
ShowWindow(hwnd, SW_RESTORE);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to get window placement, error %u\n", GetLastError());
+ ok(ret, "failed to get window placement, error %lu\n", GetLastError());
ok(wp.showCmd == SW_SHOWNORMAL, "got show cmd %u\n", wp.showCmd);
ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000,
- "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
- "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n",
wine_dbgstr_rect(&wp.rcNormalPosition));
@@ -12386,15 +12386,15 @@ static void test_window_placement(void)
wp.ptMaxPosition.x = wp.ptMaxPosition.y = 100;
wp.rcNormalPosition = orig2;
ret = SetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to set window placement, error %u\n", GetLastError());
+ ok(ret, "failed to set window placement, error %lu\n", GetLastError());
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to get window placement, error %u\n", GetLastError());
+ ok(ret, "failed to get window placement, error %lu\n", GetLastError());
ok(wp.showCmd == SW_SHOWNORMAL, "got show cmd %u\n", wp.showCmd);
ok(wp.ptMinPosition.x == 100 && wp.ptMinPosition.y == 100,
- "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
- "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
ok(EqualRect(&wp.rcNormalPosition, &orig2), "got normal pos %s\n",
wine_dbgstr_rect(&wp.rcNormalPosition));
GetWindowRect(hwnd, &rect);
@@ -12403,13 +12403,13 @@ static void test_window_placement(void)
ShowWindow(hwnd, SW_MINIMIZE);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to get window placement, error %u\n", GetLastError());
+ ok(ret, "failed to get window placement, error %lu\n", GetLastError());
ok(!wp.flags, "got flags %#x\n", wp.flags);
ok(wp.showCmd == SW_SHOWMINIMIZED, "got show cmd %u\n", wp.showCmd);
ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000,
- "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
- "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
ok(EqualRect(&wp.rcNormalPosition, &orig2), "got normal pos %s\n",
wine_dbgstr_rect(&wp.rcNormalPosition));
@@ -12421,16 +12421,16 @@ static void test_window_placement(void)
wp.ptMaxPosition.x = wp.ptMaxPosition.y = 100;
wp.rcNormalPosition = orig;
ret = SetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to set window placement, error %u\n", GetLastError());
+ ok(ret, "failed to set window placement, error %lu\n", GetLastError());
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to get window placement, error %u\n", GetLastError());
+ ok(ret, "failed to get window placement, error %lu\n", GetLastError());
ok(!wp.flags, "got flags %#x\n", wp.flags);
ok(wp.showCmd == SW_SHOWMINIMIZED, "got show cmd %u\n", wp.showCmd);
ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000,
- "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
- "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n",
wine_dbgstr_rect(&wp.rcNormalPosition));
@@ -12442,15 +12442,15 @@ static void test_window_placement(void)
wp.ptMaxPosition.x = wp.ptMaxPosition.y = 100;
wp.rcNormalPosition = orig;
ret = SetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to set window placement, error %u\n", GetLastError());
+ ok(ret, "failed to set window placement, error %lu\n", GetLastError());
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to get window placement, error %u\n", GetLastError());
+ ok(ret, "failed to get window placement, error %lu\n", GetLastError());
ok(wp.showCmd == SW_SHOWMAXIMIZED, "got show cmd %u\n", wp.showCmd);
ok(wp.ptMinPosition.x == 100 && wp.ptMinPosition.y == 100,
- "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
- "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n",
wine_dbgstr_rect(&wp.rcNormalPosition));
@@ -12460,30 +12460,30 @@ static void test_window_placement(void)
wp.ptMaxPosition.x = wp.ptMaxPosition.y = 100;
wp.rcNormalPosition = orig;
ret = SetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to set window placement, error %u\n", GetLastError());
+ ok(ret, "failed to set window placement, error %lu\n", GetLastError());
ShowWindow(hwnd, SW_MINIMIZE);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to get window placement, error %u\n", GetLastError());
+ ok(ret, "failed to get window placement, error %lu\n", GetLastError());
ok(wp.showCmd == SW_SHOWMINIMIZED, "got show cmd %u\n", wp.showCmd);
ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000,
- "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
- "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n",
wine_dbgstr_rect(&wp.rcNormalPosition));
ret = SetWindowPos(hwnd, NULL, 100, 100, 151, 151, SWP_NOACTIVATE | SWP_NOZORDER);
- ok(ret, "failed to set window pos, error %u\n", GetLastError());
+ ok(ret, "failed to set window pos, error %lu\n", GetLastError());
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to get window placement, error %u\n", GetLastError());
+ ok(ret, "failed to get window placement, error %lu\n", GetLastError());
ok(wp.showCmd == SW_SHOWMINIMIZED, "got show cmd %u\n", wp.showCmd);
ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000,
- "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
- "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n",
wine_dbgstr_rect(&wp.rcNormalPosition));
GetWindowRect(hwnd, &rect);
@@ -12492,12 +12492,12 @@ static void test_window_placement(void)
ShowWindow(hwnd, SW_SHOWNORMAL);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "failed to get window placement, error %u\n", GetLastError());
+ ok(ret, "failed to get window placement, error %lu\n", GetLastError());
ok(wp.showCmd == SW_NORMAL, "got show cmd %u\n", wp.showCmd);
ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000,
- "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
- "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n",
wine_dbgstr_rect(&wp.rcNormalPosition));
GetWindowRect(hwnd, &rect);
@@ -12517,7 +12517,7 @@ static void test_arrange_iconic_windows(void)
parent = CreateWindowA("MainWindowClass", "parent", WS_OVERLAPPEDWINDOW,
100, 200, 500, 300, NULL, 0, 0, NULL);
- ok(!!parent, "failed to create window, error %u\n", GetLastError());
+ ok(!!parent, "failed to create window, error %lu\n", GetLastError());
GetClientRect(parent, &parent_rect);
ClientToScreen(parent, &pt);
@@ -12528,25 +12528,25 @@ static void test_arrange_iconic_windows(void)
mm.iVertGap = 3;
mm.iArrange = ARW_TOPLEFT | ARW_RIGHT;
ret = SystemParametersInfoA(SPI_SETMINIMIZEDMETRICS, sizeof(mm), &mm, 0);
- ok(ret, "failed to set minimized metrics, error %u\n", GetLastError());
+ ok(ret, "failed to set minimized metrics, error %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = ArrangeIconicWindows(parent);
ok(!ret, "wrong ret %u\n", ret);
- ok(GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError());
+ ok(GetLastError() == 0xdeadbeef, "wrong error %lu\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(hwnds); ++i)
{
hwnds[i] = CreateWindowA("MainWindowClass", "child", WS_CHILD |
WS_OVERLAPPEDWINDOW, orig.left, orig.top, orig.right - orig.left,
orig.bottom - orig.top, parent, 0, 0, NULL);
- ok(!!hwnds[i], "failed to create window %u, error %u\n", i, GetLastError());
+ ok(!!hwnds[i], "failed to create window %u, error %lu\n", i, GetLastError());
}
SetLastError(0xdeadbeef);
ret = ArrangeIconicWindows(parent);
ok(!ret, "wrong ret %u\n", ret);
- ok(GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError());
+ ok(GetLastError() == 0xdeadbeef, "wrong error %lu\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(hwnds); ++i)
{
@@ -12563,7 +12563,7 @@ static void test_arrange_iconic_windows(void)
{
ret = SetWindowPos(hwnds[i], 0, orig.left, orig.top, 0, 0,
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
- ok(ret, "hwnd %u: failed to move window, error %u\n", i, GetLastError());
+ ok(ret, "hwnd %u: failed to move window, error %lu\n", i, GetLastError());
}
ret = ArrangeIconicWindows(parent);
@@ -12590,7 +12590,7 @@ static void test_arrange_iconic_windows(void)
ShowWindow(hwnds[i], SW_MINIMIZE);
ret = SetWindowPos(hwnds[i], 0, orig.left, orig.top, 0, 0,
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
- ok(ret, "hwnd %u: failed to move window, error %u\n", i, GetLastError());
+ ok(ret, "hwnd %u: failed to move window, error %lu\n", i, GetLastError());
}
ret = ArrangeIconicWindows(parent);
@@ -12619,13 +12619,13 @@ static void test_arrange_iconic_windows(void)
mm.iArrange = ARW_BOTTOMRIGHT | ARW_UP;
mm.iVertGap = 10;
ret = SystemParametersInfoA(SPI_SETMINIMIZEDMETRICS, sizeof(mm), &mm, 0);
- ok(ret, "failed to set minimized metrics, error %u\n", GetLastError());
+ ok(ret, "failed to set minimized metrics, error %lu\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(hwnds); ++i)
{
ret = SetWindowPos(hwnds[i], 0, orig.left, orig.top, 0, 0,
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
- ok(ret, "hwnd %u: failed to move window, error %u\n", i, GetLastError());
+ ok(ret, "hwnd %u: failed to move window, error %lu\n", i, GetLastError());
}
ret = ArrangeIconicWindows(parent);
@@ -12656,7 +12656,7 @@ static void test_arrange_iconic_windows(void)
DestroyWindow(parent);
ret = SystemParametersInfoA(SPI_SETMINIMIZEDMETRICS, sizeof(oldmm), &oldmm, 0);
- ok(ret, "failed to restore minimized metrics, error %u\n", GetLastError());
+ ok(ret, "failed to restore minimized metrics, error %lu\n", GetLastError());
}
static void other_process_proc(HWND hwnd)
@@ -12672,36 +12672,36 @@ static void other_process_proc(HWND hwnd)
/* SW_SHOW */
ret = WaitForSingleObject(window_ready_event, 5000);
- ok(ret == WAIT_OBJECT_0, "Unexpected ret %x.\n", ret);
+ ok(ret == WAIT_OBJECT_0, "Unexpected ret %lx.\n", ret);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "Unexpected ret %#x.\n", ret);
+ ok(ret, "Unexpected ret %#lx.\n", ret);
ok(wp.showCmd == SW_SHOWNORMAL, "Unexpected showCmd %#x.\n", wp.showCmd);
ok(!wp.flags, "Unexpected flags %#x.\n", wp.flags);
SetEvent(test_done_event);
/* SW_SHOWMAXIMIZED */
ret = WaitForSingleObject(window_ready_event, 5000);
- ok(ret == WAIT_OBJECT_0, "Unexpected ret %x.\n", ret);
+ ok(ret == WAIT_OBJECT_0, "Unexpected ret %lx.\n", ret);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "Unexpected ret %#x.\n", ret);
+ ok(ret, "Unexpected ret %#lx.\n", ret);
ok(wp.showCmd == SW_SHOWMAXIMIZED, "Unexpected showCmd %#x.\n", wp.showCmd);
todo_wine ok(wp.flags == WPF_RESTORETOMAXIMIZED, "Unexpected flags %#x.\n", wp.flags);
SetEvent(test_done_event);
/* SW_SHOWMINIMIZED */
ret = WaitForSingleObject(window_ready_event, 5000);
- ok(ret == WAIT_OBJECT_0, "Unexpected ret %x.\n", ret);
+ ok(ret == WAIT_OBJECT_0, "Unexpected ret %lx.\n", ret);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "Unexpected ret %#x.\n", ret);
+ ok(ret, "Unexpected ret %#lx.\n", ret);
ok(wp.showCmd == SW_SHOWMINIMIZED, "Unexpected showCmd %#x.\n", wp.showCmd);
todo_wine ok(wp.flags == WPF_RESTORETOMAXIMIZED, "Unexpected flags %#x.\n", wp.flags);
SetEvent(test_done_event);
/* SW_RESTORE */
ret = WaitForSingleObject(window_ready_event, 5000);
- ok(ret == WAIT_OBJECT_0, "Unexpected ret %x.\n", ret);
+ ok(ret == WAIT_OBJECT_0, "Unexpected ret %lx.\n", ret);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "Unexpected ret %#x.\n", ret);
+ ok(ret, "Unexpected ret %#lx.\n", ret);
ok(wp.showCmd == SW_SHOWMAXIMIZED, "Unexpected showCmd %#x.\n", wp.showCmd);
todo_wine ok(wp.flags == WPF_RESTORETOMAXIMIZED, "Unexpected flags %#x.\n", wp.flags);
SetEvent(test_done_event);
@@ -12721,10 +12721,10 @@ static void test_SC_SIZE(void)
ok(!!hwnd, "CreateWindowEx failed.\n");
GetWindowRect(hwnd, &rect);
- ok(rect.left == 100, "rect.left = %d\n", rect.left);
- ok(rect.top == 100, "rect.top = %d\n", rect.top);
- ok(rect.right == 200, "rect.right = %d\n", rect.right);
- ok(rect.bottom == 200, "rect.bottom = %d\n", rect.bottom);
+ ok(rect.left == 100, "rect.left = %ld\n", rect.left);
+ ok(rect.top == 100, "rect.top = %ld\n", rect.top);
+ ok(rect.right == 200, "rect.right = %ld\n", rect.right);
+ ok(rect.bottom == 200, "rect.bottom = %ld\n", rect.bottom);
SetCursorPos(100, 100);
PostMessageA(hwnd, WM_SYSCOMMAND, SC_SIZE | 9, MAKELONG(100, 100));
@@ -12741,10 +12741,10 @@ static void test_SC_SIZE(void)
}
GetWindowRect(hwnd, &rect);
- ok(rect.left == 110, "rect.left = %d\n", rect.left);
- ok(rect.top == 100, "rect.top = %d\n", rect.top);
- ok(rect.right == 210, "rect.right = %d\n", rect.right);
- ok(rect.bottom == 200, "rect.bottom = %d\n", rect.bottom);
+ ok(rect.left == 110, "rect.left = %ld\n", rect.left);
+ ok(rect.top == 100, "rect.top = %ld\n", rect.top);
+ ok(rect.right == 210, "rect.right = %ld\n", rect.right);
+ ok(rect.bottom == 200, "rect.bottom = %ld\n", rect.bottom);
DestroyWindow(hwnd);
}
@@ -12820,11 +12820,11 @@ static void test_cancel_mode(void)
ok(GetCapture() == hwnd1, "got capture %p\n", GetCapture());
ret = SendMessageA(hwnd2, WM_CANCELMODE, 0, 0);
- ok(!ret, "got %ld\n", ret);
+ ok(!ret, "got %Id\n", ret);
ok(GetCapture() == hwnd1, "got capture %p\n", GetCapture());
ret = SendMessageA(hwnd1, WM_CANCELMODE, 0, 0);
- ok(!ret, "got %ld\n", ret);
+ ok(!ret, "got %Id\n", ret);
ok(!GetCapture(), "got capture %p\n", GetCapture());
child = CreateWindowA("MainWindowClass", "child", WS_CHILD,
@@ -12834,15 +12834,15 @@ static void test_cancel_mode(void)
ok(GetCapture() == child, "got capture %p\n", GetCapture());
ret = SendMessageA(hwnd2, WM_CANCELMODE, 0, 0);
- ok(!ret, "got %ld\n", ret);
+ ok(!ret, "got %Id\n", ret);
ok(GetCapture() == child, "got capture %p\n", GetCapture());
ret = SendMessageA(hwnd1, WM_CANCELMODE, 0, 0);
- ok(!ret, "got %ld\n", ret);
+ ok(!ret, "got %Id\n", ret);
ok(GetCapture() == child, "got capture %p\n", GetCapture());
ret = SendMessageA(child, WM_CANCELMODE, 0, 0);
- ok(!ret, "got %ld\n", ret);
+ ok(!ret, "got %Id\n", ret);
ok(!GetCapture(), "got capture %p\n", GetCapture());
DestroyWindow(child);
@@ -12880,23 +12880,23 @@ static LRESULT WINAPI ncdestroy_test_proc( HWND hwnd, UINT msg, WPARAM wp, LPARA
todo_wine
ok( !ret, "SetWindowPos succeeded\n" );
todo_wine
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "SetWindowPos returned error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "SetWindowPos returned error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
parent = SetParent( hwnd, hwndMain );
ok( parent == 0, "SetParent returned %p\n", parent );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError() );
ret = GetWindowRect( hwnd, &rect );
- ok( ret, "GetWindowRect failed: %u\n", GetLastError() );
+ ok( ret, "GetWindowRect failed: %lu\n", GetLastError() );
SetRect( &exp, 10, 20, 110, 220 );
ok( EqualRect( &rect, &exp ), "unexpected rect %s, expected %s\n", wine_dbgstr_rect( &rect ),
wine_dbgstr_rect( &exp ));
ret = MoveWindow( hwnd, 11, 12, 20, 30, FALSE );
- ok( ret, "MoveWindow failed: %u\n", GetLastError() );
+ ok( ret, "MoveWindow failed: %lu\n", GetLastError() );
ret = GetWindowRect( hwnd, &rect );
- ok( ret, "GetWindowRect failed: %u\n", GetLastError() );
+ ok( ret, "GetWindowRect failed: %lu\n", GetLastError() );
SetRect( &exp, 11, 12, 31, 42 );
ok( EqualRect( &rect, &exp ), "unexpected rect %s, expected %s\n", wine_dbgstr_rect( &rect ),
wine_dbgstr_rect( &exp ));
@@ -12904,7 +12904,7 @@ static LRESULT WINAPI ncdestroy_test_proc( HWND hwnd, UINT msg, WPARAM wp, LPARA
child = CreateWindowExA( 0, "ToolWindowClass", "Tool window 1", WS_CHILD,
0, 0, 100, 100, hwnd, 0, 0, NULL );
ok( !child && GetLastError() == ERROR_INVALID_PARAMETER,
- "CreateWindowExA returned %p %u\n", child, GetLastError() );
+ "CreateWindowExA returned %p %lu\n", child, GetLastError() );
break;
}
@@ -12940,12 +12940,12 @@ static void test_WM_NCCALCSIZE(void)
cls.lpszMenuName = NULL;
cls.lpszClassName = "dummy_window_class";
ret = RegisterClassA(&cls);
- ok(ret, "RegisterClass error %u\n", GetLastError());
+ ok(ret, "RegisterClass error %lu\n", GetLastError());
hwnd = CreateWindowExA(0, "dummy_window_class", NULL,
WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP,
100, 100, 200, 200, 0, 0, GetModuleHandleA(NULL), NULL);
- ok(hwnd != 0, "CreateWindowEx error %u\n", GetLastError());
+ ok(hwnd != 0, "CreateWindowEx error %lu\n", GetLastError());
GetWindowRect(hwnd, &window_rect);
params.rgrc[0] = window_rect;
@@ -12964,22 +12964,22 @@ static void test_WM_NCCALCSIZE(void)
params.lppos = &winpos;
ret = SendMessageW(hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms);
- ok(!ret, "got %08lx\n", ret);
+ ok(!ret, "got %08Ix\n", ret);
ok(EqualRect(¶ms.rgrc[0], &client_rect), "got %s\n", wine_dbgstr_rect(¶ms.rgrc[0]));
params.rgrc[0] = window_rect;
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms);
- ok(!ret, "got %08lx\n", ret);
+ ok(!ret, "got %08Ix\n", ret);
ok(EqualRect(¶ms.rgrc[0], &client_rect), "got %s\n", wine_dbgstr_rect(¶ms.rgrc[0]));
GetWindowRect(hwnd, &window_rect);
ret = SendMessageW(hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&window_rect);
- ok(!ret, "got %08lx\n", ret);
+ ok(!ret, "got %08Ix\n", ret);
ok(EqualRect(&window_rect, &client_rect), "got %s\n", wine_dbgstr_rect(&window_rect));
GetWindowRect(hwnd, &window_rect);
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&window_rect);
- ok(!ret, "got %08lx\n", ret);
+ ok(!ret, "got %08Ix\n", ret);
ok(EqualRect(&window_rect, &client_rect), "got %s\n", wine_dbgstr_rect(&window_rect));
DestroyWindow(hwnd);
diff --git a/dlls/user32/tests/winstation.c b/dlls/user32/tests/winstation.c
index 9899b6c7f7b..9c27b5afd01 100644
--- a/dlls/user32/tests/winstation.c
+++ b/dlls/user32/tests/winstation.c
@@ -81,11 +81,11 @@ static DWORD CALLBACK thread( LPVOID arg )
SetLastError( 0xdeadbeef );
ok( !CloseHandle( d1 ), "CloseHandle succeeded\n" );
- ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %d\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %ld\n", GetLastError() );
SetLastError( 0xdeadbeef );
ok( !CloseDesktop( d1 ), "CloseDesktop succeeded\n" );
ok( GetLastError() == ERROR_BUSY || broken(GetLastError() == 0xdeadbeef), /* wow64 */
- "bad last error %d\n", GetLastError() );
+ "bad last error %ld\n", GetLastError() );
print_object( d1 );
d2 = CreateDesktopA( "foobar2", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL );
trace( "created desktop %p\n", d2 );
@@ -94,7 +94,7 @@ static DWORD CALLBACK thread( LPVOID arg )
SetLastError( 0xdeadbeef );
ok( !SetThreadDesktop( d2 ), "set thread desktop succeeded with existing window\n" );
ok( GetLastError() == ERROR_BUSY || broken(GetLastError() == 0xdeadbeef), /* wow64 */
- "bad last error %d\n", GetLastError() );
+ "bad last error %ld\n", GetLastError() );
DestroyWindow( hwnd );
ok( SetThreadDesktop( d2 ), "set thread desktop failed\n" );
@@ -130,7 +130,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 %d\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %ld\n", GetLastError() );
print_object( w1 );
flags = 0;
@@ -149,14 +149,14 @@ static void test_handles(void)
w2 = CreateWindowStationA("WinSta0", 0, WINSTA_ALL_ACCESS, NULL );
le = GetLastError();
- ok( w2 != 0 || le == ERROR_ACCESS_DENIED, "CreateWindowStation failed (%u)\n", le );
+ ok( w2 != 0 || le == ERROR_ACCESS_DENIED, "CreateWindowStation failed (%lu)\n", le );
if (w2 != 0)
{
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 || broken(GetLastError() == 0xdeadbeef), /* wow64 */
- "bad last error %d\n", GetLastError() );
+ "bad last error %ld\n", GetLastError() );
ok( CloseWindowStation( w2 ), "CloseWindowStation failed\n" );
w2 = CreateWindowStationA("WinSta0", 0, WINSTA_ALL_ACCESS, NULL );
@@ -176,7 +176,7 @@ static void test_handles(void)
CreateMutexA( NULL, 0, "foobar" );
w2 = CreateWindowStationA("foobar", 0, WINSTA_ALL_ACCESS, NULL );
le = GetLastError();
- ok( w2 != 0 || le == ERROR_ACCESS_DENIED, "create foobar station failed (%u)\n", le );
+ ok( w2 != 0 || le == ERROR_ACCESS_DENIED, "create foobar station failed (%lu)\n", le );
if (w2 != 0)
{
@@ -216,35 +216,35 @@ static void test_handles(void)
SetLastError( 0xdeadbeef );
w2 = OpenWindowStationA( "", TRUE, WINSTA_ALL_ACCESS );
ok( !w2, "open station succeeded\n" );
- ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
w2 = CreateWindowStationA( "", 0, WINSTA_ALL_ACCESS, NULL );
- ok( w2 != 0, "create station failed err %u\n", GetLastError() );
+ ok( w2 != 0, "create station failed err %lu\n", GetLastError() );
memset( buffer, 0, sizeof(buffer) );
ret = GetUserObjectInformationA( w2, UOI_NAME, buffer, sizeof(buffer), &size );
- ok( ret, "GetUserObjectInformationA failed with error %u\n", GetLastError() );
+ ok( ret, "GetUserObjectInformationA failed with error %lu\n", GetLastError() );
/* Get the logon session LUID */
ret = GetTokenInformation( GetCurrentProcessToken(), TokenStatistics, &token_stats, sizeof(token_stats), NULL );
if (ret)
- sprintf( default_name, "Service-0x%x-%x$", token_stats.AuthenticationId.HighPart,
+ sprintf( default_name, "Service-0x%lx-%lx$", token_stats.AuthenticationId.HighPart,
token_stats.AuthenticationId.LowPart );
if (*default_name)
ok( !strcmp( buffer, default_name ), "unexpected window station name '%s' expected '%s'\n", buffer, default_name );
SetLastError( 0xdeadbeef );
w3 = OpenWindowStationA( "", TRUE, WINSTA_ALL_ACCESS );
- ok( w3 != 0, "open station failed err %u\n", GetLastError() );
+ ok( w3 != 0, "open station failed err %lu\n", GetLastError() );
CloseWindowStation( w3 );
CloseWindowStation( w2 );
w2 = CreateWindowStationA( NULL, 0, WINSTA_ALL_ACCESS, NULL );
- ok( w2 != 0, "create station failed err %u\n", GetLastError() );
+ ok( w2 != 0, "create station failed err %lu\n", GetLastError() );
memset( buffer, 0, sizeof(buffer) );
ret = GetUserObjectInformationA( w2, UOI_NAME, buffer, sizeof(buffer), &size );
- ok( ret, "GetUserObjectInformationA failed with error %u\n", GetLastError() );
+ ok( ret, "GetUserObjectInformationA failed with error %lu\n", GetLastError() );
if (*default_name)
ok( !strcmp( buffer, default_name ), "unexpected window station name '%s' expected '%s'\n", buffer, default_name );
CloseWindowStation( w2 );
@@ -253,12 +253,12 @@ static void test_handles(void)
w2 = CreateWindowStationA( "foo\\bar", 0, WINSTA_ALL_ACCESS, NULL );
ok( !w2, "create station succeeded\n" );
ok( GetLastError() == ERROR_PATH_NOT_FOUND || GetLastError() == ERROR_ACCESS_DENIED,
- "wrong error %u\n", GetLastError() );
+ "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
w2 = OpenWindowStationA( "foo\\bar", TRUE, WINSTA_ALL_ACCESS );
ok( !w2, "create station succeeded\n" );
- ok( GetLastError() == ERROR_PATH_NOT_FOUND, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_PATH_NOT_FOUND, "wrong error %lu\n", GetLastError() );
/* desktops */
d1 = GetThreadDesktop(GetCurrentThreadId());
@@ -273,7 +273,7 @@ static void test_handles(void)
SetLastError( 0xdeadbeef );
ok( !CloseDesktop(d1), "closing thread desktop succeeded\n" );
ok( GetLastError() == ERROR_BUSY || broken(GetLastError() == 0xdeadbeef), /* wow64 */
- "bad last error %d\n", GetLastError() );
+ "bad last error %ld\n", GetLastError() );
SetLastError( 0xdeadbeef );
if (CloseHandle( d1 )) /* succeeds on nt4 */
@@ -281,7 +281,7 @@ static void test_handles(void)
win_skip( "NT4 desktop handle management is completely different\n" );
return;
}
- ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %d\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %ld\n", GetLastError() );
ok( DuplicateHandle( GetCurrentProcess(), d1, GetCurrentProcess(), (PHANDLE)&d2, 0,
TRUE, DUPLICATE_SAME_ACCESS ), "DuplicateHandle failed\n" );
@@ -297,34 +297,34 @@ static void test_handles(void)
SetLastError( 0xdeadbeef );
d2 = CreateDesktopA( "", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL );
ok( !d2, "create empty desktop succeeded\n" );
- ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
d2 = OpenDesktopA( "", 0, TRUE, DESKTOP_ALL_ACCESS );
ok( !d2, "open empty desktop succeeded\n" );
- ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
d2 = CreateDesktopA( "foo\\bar", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL );
ok( !d2, "create desktop succeeded\n" );
- ok( GetLastError() == ERROR_BAD_PATHNAME, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_BAD_PATHNAME, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
d2 = OpenDesktopA( "foo\\bar", 0, TRUE, DESKTOP_ALL_ACCESS );
ok( !d2, "open desktop succeeded\n" );
- ok( GetLastError() == ERROR_BAD_PATHNAME, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_BAD_PATHNAME, "wrong error %lu\n", GetLastError() );
d2 = CreateDesktopA( "foobar", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL );
ok( d2 != 0, "create foobar desktop failed\n" );
SetLastError( 0xdeadbeef );
ok( !CloseWindowStation( (HWINSTA)d2 ), "CloseWindowStation succeeded on desktop\n" );
ok( GetLastError() == ERROR_INVALID_HANDLE || broken(GetLastError() == 0xdeadbeef), /* wow64 */
- "bad last error %d\n", GetLastError() );
+ "bad last error %ld\n", GetLastError() );
SetLastError( 0xdeadbeef );
d3 = CreateDesktopA( "foobar", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL );
ok( d3 != 0, "create foobar desktop again failed\n" );
- ok( GetLastError() == 0xdeadbeef, "bad last error %d\n", GetLastError() );
+ ok( GetLastError() == 0xdeadbeef, "bad last error %ld\n", GetLastError() );
ok( CloseDesktop( d3 ), "CloseDesktop failed\n" );
d3 = OpenDesktopA( "foobar", 0, TRUE, DESKTOP_ALL_ACCESS );
@@ -383,12 +383,12 @@ static void test_enumstations(void)
SetLastError(0xbabefeed);
ret = EnumWindowStationsA(NULL, 0);
ok(!ret, "EnumWindowStationsA returned successfully!\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "LastError is set to %08x\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "LastError is set to %08lx\n", GetLastError());
}
hwinsta = CreateWindowStationA("winsta_test", 0, WINSTA_ALL_ACCESS, NULL);
ret = GetLastError();
- ok(hwinsta != NULL || ret == ERROR_ACCESS_DENIED, "CreateWindowStation failed (%u)\n", ret);
+ ok(hwinsta != NULL || ret == ERROR_ACCESS_DENIED, "CreateWindowStation failed (%lu)\n", ret);
if (!hwinsta)
{
win_skip("Not enough privileges for CreateWindowStation\n");
@@ -397,13 +397,13 @@ static void test_enumstations(void)
SetLastError(0xdeadbeef);
ret = EnumWindowStationsA(open_window_station_callbackA, 0x12345);
- ok(ret == 0x12345, "EnumWindowStationsA returned %x\n", ret);
- ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError());
+ ok(ret == 0x12345, "EnumWindowStationsA returned %lx\n", ret);
+ ok(GetLastError() == 0xdeadbeef, "LastError is set to %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
ret = EnumWindowStationsA(window_station_callbackA, 0);
- ok(!ret, "EnumWindowStationsA returned %x\n", ret);
- ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError());
+ ok(!ret, "EnumWindowStationsA returned %lx\n", ret);
+ ok(GetLastError() == 0xdeadbeef, "LastError is set to %08lx\n", GetLastError());
}
static BOOL CALLBACK desktop_callbackA(LPSTR desktop, LPARAM lp)
@@ -438,28 +438,28 @@ static void test_enumdesktops(void)
SetLastError(0xbabefeed);
ret = EnumDesktopsA(GetProcessWindowStation(), NULL, 0);
ok(!ret, "EnumDesktopsA returned successfully!\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "LastError is set to %08x\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "LastError is set to %08lx\n", GetLastError());
}
SetLastError(0xdeadbeef);
ret = EnumDesktopsA(NULL, desktop_callbackA, 0x12345);
ok(ret == 0x12345, "EnumDesktopsA returned %x\n", ret);
- ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError());
+ ok(GetLastError() == 0xdeadbeef, "LastError is set to %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
ret = EnumDesktopsA(GetProcessWindowStation(), open_desktop_callbackA, 0x12345);
ok(ret == 0x12345, "EnumDesktopsA returned %x\n", ret);
- ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError());
+ ok(GetLastError() == 0xdeadbeef, "LastError is set to %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
ret = EnumDesktopsA(INVALID_HANDLE_VALUE, desktop_callbackA, 0x12345);
ok(!ret, "EnumDesktopsA returned %x\n", ret);
- ok(GetLastError() == ERROR_INVALID_HANDLE, "LastError is set to %08x\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "LastError is set to %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
ret = EnumDesktopsA(GetProcessWindowStation(), desktop_callbackA, 0);
ok(!ret, "EnumDesktopsA returned %x\n", ret);
- ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError());
+ ok(GetLastError() == 0xdeadbeef, "LastError is set to %08lx\n", GetLastError());
}
/* Miscellaneous tests */
@@ -489,8 +489,8 @@ static void test_getuserobjectinformation(void)
ret = GetUserObjectInformationA(desk, UOI_NAME, NULL, 0, &size);
ok(!ret, "GetUserObjectInformationA returned %x\n", ret);
- ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "LastError is set to %08x\n", GetLastError());
- ok(size == 22, "size is set to %d\n", size); /* Windows returns Unicode length (11*2) */
+ ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "LastError is set to %08lx\n", GetLastError());
+ ok(size == 22, "size is set to %ld\n", size); /* Windows returns Unicode length (11*2) */
/* Get string */
SetLastError(0xdeadbeef);
@@ -498,10 +498,10 @@ static void test_getuserobjectinformation(void)
ret = GetUserObjectInformationA(desk, UOI_NAME, buffer, sizeof(buffer), &size);
ok(ret, "GetUserObjectInformationA returned %x\n", ret);
- ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError());
+ ok(GetLastError() == 0xdeadbeef, "LastError is set to %08lx\n", GetLastError());
ok(strcmp(buffer, "foobarTest") == 0, "Buffer is set to '%s'\n", buffer);
- ok(size == 11, "size is set to %d\n", size); /* 11 bytes in 'foobarTest\0' */
+ ok(size == 11, "size is set to %ld\n", size); /* 11 bytes in 'foobarTest\0' */
/* Get size, test size and return value/error code (Unicode) */
SetLastError(0xdeadbeef);
@@ -509,8 +509,8 @@ static void test_getuserobjectinformation(void)
ret = GetUserObjectInformationW(desk, UOI_NAME, NULL, 0, &size);
ok(!ret, "GetUserObjectInformationW returned %x\n", ret);
- ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "LastError is set to %08x\n", GetLastError());
- ok(size == 22, "size is set to %d\n", size); /* 22 bytes in 'foobarTest\0' in Unicode */
+ ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "LastError is set to %08lx\n", GetLastError());
+ ok(size == 22, "size is set to %ld\n", size); /* 22 bytes in 'foobarTest\0' in Unicode */
/* Get string (Unicode) */
SetLastError(0xdeadbeef);
@@ -518,15 +518,15 @@ static void test_getuserobjectinformation(void)
ret = GetUserObjectInformationW(desk, UOI_NAME, bufferW, sizeof(bufferW), &size);
ok(ret, "GetUserObjectInformationW returned %x\n", ret);
- ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError());
+ ok(GetLastError() == 0xdeadbeef, "LastError is set to %08lx\n", GetLastError());
ok(lstrcmpW(bufferW, foobarTestW + 1) == 0, "Buffer is not set to 'foobarTest'\n");
- ok(size == 22, "size is set to %d\n", size); /* 22 bytes in 'foobarTest\0' in Unicode */
+ ok(size == 22, "size is set to %ld\n", size); /* 22 bytes in 'foobarTest\0' in Unicode */
/* ObjectNameInformation does not return the full desktop name */
name_info = (OBJECT_NAME_INFORMATION *)buffer;
status = pNtQueryObject(desk, ObjectNameInformation, name_info, sizeof(buffer), NULL);
- ok(!status, "expected STATUS_SUCCESS, got %08x\n", status);
+ ok(!status, "expected STATUS_SUCCESS, got %08lx\n", status);
ok(lstrcmpW(name_info->Name.Buffer, foobarTestW) == 0,
"expected '\\foobarTest', got %s\n", wine_dbgstr_w(name_info->Name.Buffer));
@@ -538,8 +538,8 @@ static void test_getuserobjectinformation(void)
ret = GetUserObjectInformationA(desk, UOI_TYPE, NULL, 0, &size);
ok(!ret, "GetUserObjectInformationA returned %x\n", ret);
- ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "LastError is set to %08x\n", GetLastError());
- ok(size == 16, "size is set to %d\n", size); /* Windows returns Unicode length (8*2) */
+ ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "LastError is set to %08lx\n", GetLastError());
+ ok(size == 16, "size is set to %ld\n", size); /* Windows returns Unicode length (8*2) */
/* Get string */
SetLastError(0xdeadbeef);
@@ -547,10 +547,10 @@ static void test_getuserobjectinformation(void)
ret = GetUserObjectInformationA(desk, UOI_TYPE, buffer, sizeof(buffer), &size);
ok(ret, "GetUserObjectInformationA returned %x\n", ret);
- ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError());
+ ok(GetLastError() == 0xdeadbeef, "LastError is set to %08lx\n", GetLastError());
ok(strcmp(buffer, "Desktop") == 0, "Buffer is set to '%s'\n", buffer);
- ok(size == 8, "size is set to %d\n", size); /* 8 bytes in 'Desktop\0' */
+ ok(size == 8, "size is set to %ld\n", size); /* 8 bytes in 'Desktop\0' */
/* Get size, test size and return value/error code (Unicode) */
size = 0xdeadbeef;
@@ -558,8 +558,8 @@ static void test_getuserobjectinformation(void)
ret = GetUserObjectInformationW(desk, UOI_TYPE, NULL, 0, &size);
ok(!ret, "GetUserObjectInformationW returned %x\n", ret);
- ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "LastError is set to %08x\n", GetLastError());
- ok(size == 16, "size is set to %d\n", size); /* 16 bytes in 'Desktop\0' in Unicode */
+ ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "LastError is set to %08lx\n", GetLastError());
+ ok(size == 16, "size is set to %ld\n", size); /* 16 bytes in 'Desktop\0' in Unicode */
/* Get string (Unicode) */
SetLastError(0xdeadbeef);
@@ -567,10 +567,10 @@ static void test_getuserobjectinformation(void)
ret = GetUserObjectInformationW(desk, UOI_TYPE, bufferW, sizeof(bufferW), &size);
ok(ret, "GetUserObjectInformationW returned %x\n", ret);
- ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError());
+ ok(GetLastError() == 0xdeadbeef, "LastError is set to %08lx\n", GetLastError());
ok(lstrcmpW(bufferW, DesktopW) == 0, "Buffer is not set to 'Desktop'\n");
- ok(size == 16, "size is set to %d\n", size); /* 16 bytes in 'Desktop\0' in Unicode */
+ ok(size == 16, "size is set to %ld\n", size); /* 16 bytes in 'Desktop\0' in Unicode */
ok(CloseDesktop(desk), "CloseDesktop failed\n");
}
@@ -615,8 +615,8 @@ static void test_inputdesktop(void)
SetLastError(0xdeadbeef);
ret = SendInput(1, inputs, sizeof(INPUT));
- ok(GetLastError() == 0xdeadbeef, "unexpected last error %08x\n", GetLastError());
- ok(ret == 1, "unexpected return count %d\n", ret);
+ ok(GetLastError() == 0xdeadbeef, "unexpected last error %08lx\n", GetLastError());
+ ok(ret == 1, "unexpected return count %ld\n", ret);
/* Set thread desktop to the new desktop, SendInput should fail. */
new_desk = CreateDesktopA("new_desk", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL);
@@ -641,8 +641,8 @@ static void test_inputdesktop(void)
return;
}
todo_wine
- ok(GetLastError() == ERROR_ACCESS_DENIED, "unexpected last error %08x\n", GetLastError());
- ok(ret == 1 || broken(ret == 0) /* Win64 */, "unexpected return count %d\n", ret);
+ ok(GetLastError() == ERROR_ACCESS_DENIED, "unexpected last error %08lx\n", GetLastError());
+ ok(ret == 1 || broken(ret == 0) /* Win64 */, "unexpected return count %ld\n", ret);
/* Set thread desktop back to the old thread desktop, SendInput should success. */
ret = SetThreadDesktop(old_thread_desk);
@@ -655,8 +655,8 @@ static void test_inputdesktop(void)
SetLastError(0xdeadbeef);
ret = SendInput(1, inputs, sizeof(INPUT));
- ok(GetLastError() == 0xdeadbeef, "unexpected last error %08x\n", GetLastError());
- ok(ret == 1, "unexpected return count %d\n", ret);
+ ok(GetLastError() == 0xdeadbeef, "unexpected last error %08lx\n", GetLastError());
+ ok(ret == 1, "unexpected return count %ld\n", ret);
/* Set thread desktop to the input desktop, SendInput should success. */
ret = SetThreadDesktop(old_input_desk);
@@ -669,8 +669,8 @@ static void test_inputdesktop(void)
SetLastError(0xdeadbeef);
ret = SendInput(1, inputs, sizeof(INPUT));
- ok(GetLastError() == 0xdeadbeef, "unexpected last error %08x\n", GetLastError());
- ok(ret == 1, "unexpected return count %d\n", ret);
+ ok(GetLastError() == 0xdeadbeef, "unexpected last error %08lx\n", GetLastError());
+ ok(ret == 1, "unexpected return count %ld\n", ret);
/* Switch input desktop to the new desktop, SendInput should fail. */
ret = SwitchDesktop(new_desk);
@@ -689,8 +689,8 @@ static void test_inputdesktop(void)
SetLastError(0xdeadbeef);
ret = SendInput(1, inputs, sizeof(INPUT));
todo_wine
- ok(GetLastError() == ERROR_ACCESS_DENIED, "unexpected last error %08x\n", GetLastError());
- ok(ret == 1 || broken(ret == 0) /* Win64 */, "unexpected return count %d\n", ret);
+ ok(GetLastError() == ERROR_ACCESS_DENIED, "unexpected last error %08lx\n", GetLastError());
+ ok(ret == 1 || broken(ret == 0) /* Win64 */, "unexpected return count %ld\n", ret);
/* Set thread desktop to the new desktop, SendInput should success. */
ret = SetThreadDesktop(new_desk);
@@ -703,8 +703,8 @@ static void test_inputdesktop(void)
SetLastError(0xdeadbeef);
ret = SendInput(1, inputs, sizeof(INPUT));
- ok(GetLastError() == 0xdeadbeef, "unexpected last error %08x\n", GetLastError());
- ok(ret == 1, "unexpected return count %d\n", ret);
+ ok(GetLastError() == 0xdeadbeef, "unexpected last error %08lx\n", GetLastError());
+ ok(ret == 1, "unexpected return count %ld\n", ret);
/* Switch input desktop to the old input desktop, set thread desktop to the old
* thread desktop, clean side effects. SendInput should success. */
@@ -727,8 +727,8 @@ static void test_inputdesktop(void)
SetLastError(0xdeadbeef);
ret = SendInput(1, inputs, sizeof(INPUT));
- ok(GetLastError() == 0xdeadbeef, "unexpected last error %08x\n", GetLastError());
- ok(ret == 1, "unexpected return count %d\n", ret);
+ ok(GetLastError() == 0xdeadbeef, "unexpected last error %08lx\n", GetLastError());
+ ok(ret == 1, "unexpected return count %ld\n", ret);
/* free resources */
ret = CloseDesktop(input_desk);
@@ -752,7 +752,7 @@ static void test_inputdesktop2(void)
SetLastError(0xdeadbeef);
w2 = CreateWindowStationA("winsta_test", 0, WINSTA_ALL_ACCESS, NULL);
ret = GetLastError();
- ok(w2 != NULL || ret == ERROR_ACCESS_DENIED, "CreateWindowStation failed (%u)\n", ret);
+ ok(w2 != NULL || ret == ERROR_ACCESS_DENIED, "CreateWindowStation failed (%lu)\n", ret);
if (!w2)
{
win_skip("Not enough privileges for CreateWindowStation\n");
@@ -780,7 +780,7 @@ static void test_inputdesktop2(void)
SetLastError(0xdeadbeef);
input_desk = OpenInputDesktop(0, FALSE, DESKTOP_ALL_ACCESS);
ok(input_desk == NULL, "OpenInputDesktop should fail on non default winstation!\n");
- ok(GetLastError() == ERROR_INVALID_FUNCTION || broken(GetLastError() == 0xdeadbeef), "last error %08x\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_FUNCTION || broken(GetLastError() == 0xdeadbeef), "last error %08lx\n", GetLastError());
hdesk = OpenDesktopA("desk_test", 0, TRUE, DESKTOP_ALL_ACCESS);
ok(hdesk != NULL, "OpenDesktop failed!\n");
@@ -789,7 +789,7 @@ static void test_inputdesktop2(void)
todo_wine
ok(!ret, "Switch to desktop belong to non default winstation should fail!\n");
todo_wine
- ok(GetLastError() == ERROR_ACCESS_DENIED || broken(GetLastError() == 0xdeadbeef), "last error %08x\n", GetLastError());
+ ok(GetLastError() == ERROR_ACCESS_DENIED || broken(GetLastError() == 0xdeadbeef), "last error %08lx\n", GetLastError());
ret = SetThreadDesktop(hdesk);
ok(ret, "SetThreadDesktop failed!\n");
@@ -860,17 +860,17 @@ static DWORD set_foreground(HWND hwnd)
GetWindowTextA(hwnd_fore, win_text, 1024);
set_id = GetWindowThreadProcessId(hwnd, NULL);
fore_id = GetWindowThreadProcessId(hwnd_fore, NULL);
- trace("\"%s\" %p %08x hwnd %p %08x\n", win_text, hwnd_fore, fore_id, hwnd, set_id);
+ trace("\"%s\" %p %08lx hwnd %p %08lx\n", win_text, hwnd_fore, fore_id, hwnd, set_id);
ret = AttachThreadInput(set_id, fore_id, TRUE);
- trace("AttachThreadInput returned %08x\n", ret);
+ trace("AttachThreadInput returned %08lx\n", ret);
ret = ShowWindow(hwnd, SW_SHOWNORMAL);
- trace("ShowWindow returned %08x\n", ret);
+ trace("ShowWindow returned %08lx\n", ret);
ret = SetWindowPos(hwnd, HWND_TOPMOST, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE);
- trace("set topmost returned %08x\n", ret);
+ trace("set topmost returned %08lx\n", ret);
ret = SetWindowPos(hwnd, HWND_NOTOPMOST, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE);
- trace("set notopmost returned %08x\n", ret);
+ trace("set notopmost returned %08lx\n", ret);
ret = SetForegroundWindow(hwnd);
- trace("SetForegroundWindow returned %08x\n", ret);
+ trace("SetForegroundWindow returned %08lx\n", ret);
Sleep(250);
AttachThreadInput(set_id, fore_id, FALSE);
return ret;
@@ -899,7 +899,7 @@ static void test_foregroundwindow(void)
SetLastError(0xdeadbeef);
hdesks[1] = CreateDesktopA("desk2", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL);
ret = GetLastError();
- ok(hdesks[1] != NULL || ret == ERROR_ACCESS_DENIED, "CreateDesktop failed (%u)\n", ret);
+ ok(hdesks[1] != NULL || ret == ERROR_ACCESS_DENIED, "CreateDesktop failed (%lu)\n", ret);
if(!hdesks[1])
{
win_skip("Not enough privileges for CreateDesktop\n");
@@ -913,13 +913,13 @@ static void test_foregroundwindow(void)
CloseDesktop(hdesks[1]);
return;
}
- trace("old timeout %d\n", timeout_old);
+ trace("old timeout %ld\n", timeout_old);
timeout = 0;
ret = SystemParametersInfoA(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, 0, SPIF_SENDCHANGE | SPIF_UPDATEINIFILE);
ok(ret, "set foreground lock timeout failed!\n");
ret = SystemParametersInfoA(SPI_GETFOREGROUNDLOCKTIMEOUT, 0, &timeout, 0);
ok(ret, "get foreground lock timeout failed!\n");
- ok(timeout == 0, "unexpected timeout %d\n", timeout);
+ ok(timeout == 0, "unexpected timeout %ld\n", timeout);
for (thread_desk_id = 0; thread_desk_id < DESKTOPS; thread_desk_id++)
{
@@ -1011,7 +1011,7 @@ static void test_foregroundwindow(void)
ok(ret, "set foreground lock timeout failed!\n");
ret = SystemParametersInfoA(SPI_GETFOREGROUNDLOCKTIMEOUT, 0, &timeout, 0);
ok(ret, "get foreground lock timeout failed!\n");
- ok(timeout == timeout_old, "unexpected timeout %d\n", timeout);
+ ok(timeout == timeout_old, "unexpected timeout %ld\n", timeout);
}
START_TEST(winstation)
diff --git a/dlls/user32/tests/wsprintf.c b/dlls/user32/tests/wsprintf.c
index 567ed2ff10b..f46cfa5aea3 100644
--- a/dlls/user32/tests/wsprintf.c
+++ b/dlls/user32/tests/wsprintf.c
@@ -79,7 +79,7 @@ static void wsprintfATest(void)
int rc;
rc=wsprintfA(buf, "%010ld", -1);
- ok(rc == 10, "wsprintfA length failure: rc=%d error=%d\n",rc,GetLastError());
+ ok(rc == 10, "wsprintfA length failure: rc=%d error=%ld\n",rc,GetLastError());
ok((lstrcmpA(buf, "-000000001") == 0),
"wsprintfA zero padded negative value failure: buf=[%s]\n",buf);
rc = wsprintfA(buf, "%I64X", (ULONGLONG)0);
@@ -157,7 +157,7 @@ static void wsprintfWTest(void)
win_skip("wsprintfW is not implemented\n");
return;
}
- ok(rc == 10, "wsPrintfW length failure: rc=%d error=%d\n",rc,GetLastError());
+ ok(rc == 10, "wsPrintfW length failure: rc=%d error=%ld\n",rc,GetLastError());
ok((lstrcmpW(buf, L"-000000001") == 0),
"wsprintfW zero padded negative value failure\n");
rc = wsprintfW(buf, L"%I64x", (ULONGLONG)0 );
@@ -246,7 +246,7 @@ static void CharUpperTest(void)
break;
}
}
- ok(!failed,"CharUpper failed - 16bit input (0x%0lx) returned 32bit result (0x%0lx)\n",i,out);
+ ok(!failed,"CharUpper failed - 16bit input (0x%0Ix) returned 32bit result (0x%0Ix)\n",i,out);
}
static void CharLowerTest(void)
@@ -263,7 +263,7 @@ static void CharLowerTest(void)
break;
}
}
- ok(!failed,"CharLower failed - 16bit input (0x%0lx) returned 32bit result (0x%0lx)\n",i,out);
+ ok(!failed,"CharLower failed - 16bit input (0x%0Ix) returned 32bit result (0x%0Ix)\n",i,out);
}
More information about the wine-devel
mailing list