comctl32/tests, user32/tests: Rename [GS]etWindowLongPtr strictly to
its A-variant.
Saulius Krasuckas
saulius.krasuckas at ieee.org
Fri Jun 8 09:19:36 CDT 2007
---
dlls/comctl32/tests/listview.c | 4 ++--
dlls/comctl32/tests/progress.c | 2 +-
dlls/comctl32/tests/subclass.c | 2 +-
dlls/user32/tests/input.c | 2 +-
dlls/user32/tests/menu.c | 8 ++++----
dlls/user32/tests/win.c | 34 +++++++++++++++++-----------------
6 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index a64d4d3..066654b 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -773,13 +773,13 @@ static void test_customdraw(void)
insert_column(hwnd, 1);
insert_item(hwnd, 0);
- oldwndproc = (WNDPROC)SetWindowLongPtr(hwndparent, GWLP_WNDPROC,
+ oldwndproc = (WNDPROC)SetWindowLongPtrA(hwndparent, GWLP_WNDPROC,
(LONG_PTR)cd_wndproc);
InvalidateRect(hwnd, NULL, TRUE);
UpdateWindow(hwnd);
- SetWindowLongPtr(hwndparent, GWLP_WNDPROC, (LONG_PTR)oldwndproc);
+ SetWindowLongPtrA(hwndparent, GWLP_WNDPROC, (LONG_PTR)oldwndproc);
DestroyWindow(hwnd);
}
diff --git a/dlls/comctl32/tests/progress.c b/dlls/comctl32/tests/progress.c
index cfc0393..a39ad7f 100644
--- a/dlls/comctl32/tests/progress.c
+++ b/dlls/comctl32/tests/progress.c
@@ -109,7 +109,7 @@ static void init(void)
hProgressWnd = CreateWindowEx(0, PROGRESS_CLASS, "", WS_CHILD | WS_VISIBLE,
0, 0, rect.right, rect.bottom, hProgressParentWnd, NULL, GetModuleHandleA(NULL), 0);
assert(hProgressWnd != NULL);
- progress_wndproc = (WNDPROC)SetWindowLongPtr(hProgressWnd, GWLP_WNDPROC, (LPARAM)ProgressSubclassProc);
+ progress_wndproc = (WNDPROC)SetWindowLongPtrA(hProgressWnd, GWLP_WNDPROC, (LPARAM)ProgressSubclassProc);
ShowWindow(hProgressParentWnd, SW_SHOWNORMAL);
ok(GetUpdateRect(hProgressParentWnd, NULL, FALSE), "GetUpdateRect: There should be a region that needs to be updated\n");
diff --git a/dlls/comctl32/tests/subclass.c b/dlls/comctl32/tests/subclass.c
index 9c879e3..dd56199 100644
--- a/dlls/comctl32/tests/subclass.c
+++ b/dlls/comctl32/tests/subclass.c
@@ -234,7 +234,7 @@ static void test_subclass(void)
ok_sequence(Sub_AfterDeletedTest, "After Deleted");
pSetWindowSubclass(hwnd, WndProcSub, 2, 0);
- origProc3 = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG)WndProc3);
+ origProc3 = (WNDPROC)SetWindowLongPtrA(hwnd, GWLP_WNDPROC, (LONG)WndProc3);
SendMessage(hwnd, WM_USER, 1, 0);
SendMessage(hwnd, WM_USER, 2, 0);
ok_sequence(Sub_OldAfterNewTest, "Old after New");
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index b7d7477..baeac7b 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -496,7 +496,7 @@ static void test_Input_blackbox(void)
* key state set by SendInput(). */
empty_message_queue();
- prevWndProc = SetWindowLongPtr(window, GWLP_WNDPROC, (LONG_PTR) WndProc2);
+ prevWndProc = SetWindowLongPtrA(window, GWLP_WNDPROC, (LONG_PTR) WndProc2);
ok(prevWndProc != 0 || (prevWndProc == 0 && GetLastError() == 0),
"error: %d\n", (int) GetLastError());
diff --git a/dlls/user32/tests/menu.c b/dlls/user32/tests/menu.c
index 3037099..6de908c 100644
--- a/dlls/user32/tests/menu.c
+++ b/dlls/user32/tests/menu.c
@@ -46,7 +46,7 @@ static LRESULT WINAPI menu_check_wnd_proc(HWND hwnd, UINT msg, WPARAM wparam, LP
{
case WM_ENTERMENULOOP:
/* mark window as having entered menu loop */
- SetWindowLongPtr(hwnd, GWLP_USERDATA, TRUE);
+ SetWindowLongPtrA(hwnd, GWLP_USERDATA, TRUE);
/* exit menu modal loop
* ( A SendMessage does not work on NT3.51 here ) */
return PostMessage(hwnd, WM_CANCELMODE, 0, 0);
@@ -222,7 +222,7 @@ static void test_menu_locked_by_window(void)
SendMessage(hwnd, WM_SYSCOMMAND, SC_KEYMENU, 0);
/* did we process the WM_INITMENU message? */
- ret = GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ ret = GetWindowLongPtrA(hwnd, GWLP_USERDATA);
todo_wine {
ok(ret, "WM_INITMENU should have been sent\n");
}
@@ -241,7 +241,7 @@ static void test_menu_ownerdraw(void)
NULL, NULL, NULL, NULL);
ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
if( !hwnd) return;
- SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG)menu_ownerdraw_wnd_proc);
+ SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG)menu_ownerdraw_wnd_proc);
hmenu = CreatePopupMenu();
ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError());
if( !hmenu) { DestroyWindow(hwnd);return;}
@@ -483,7 +483,7 @@ static void test_menu_bmp_and_string(void)
ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
if( !hwnd) return;
- SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG)menu_ownerdraw_wnd_proc);
+ SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG)menu_ownerdraw_wnd_proc);
if( winetest_debug)
trace(" check %d,%d arrow %d avechar %d\n",
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index df20302..98cca58 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -1825,7 +1825,7 @@ static void test_SetWindowPos(HWND hwnd)
GetWindowRect(hwnd, &orig_win_rc);
- old_proc = SetWindowLongPtr( hwnd, GWLP_WNDPROC, (ULONG_PTR)nccalcsize_proc );
+ old_proc = SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (ULONG_PTR)nccalcsize_proc );
SetWindowPos(hwnd, 0, 100, 100, 0, 0, SWP_NOZORDER|SWP_FRAMECHANGED);
GetWindowRect( hwnd, &rect );
ok( rect.left == 100 && rect.top == 100 && rect.right == 100 && rect.bottom == 100,
@@ -1846,7 +1846,7 @@ static void test_SetWindowPos(HWND hwnd)
SetWindowPos(hwnd, 0, orig_win_rc.left, orig_win_rc.top,
orig_win_rc.right, orig_win_rc.bottom, 0);
- SetWindowLongPtr( hwnd, GWLP_WNDPROC, old_proc );
+ SetWindowLongPtrA( hwnd, GWLP_WNDPROC, old_proc );
/* Win9x truncates coordinates to 16-bit irrespectively */
if (!is_win9x)
@@ -4025,25 +4025,25 @@ static void test_SetWindowLong(void)
WNDPROC old_window_procW;
SetLastError(0xdeadbeef);
- retval = SetWindowLongPtr(NULL, GWLP_WNDPROC, 0);
- ok(!retval, "SetWindowLongPtr on invalid window handle should have returned 0 instead of 0x%lx\n", retval);
+ retval = SetWindowLongPtrA(NULL, GWLP_WNDPROC, 0);
+ ok(!retval, "SetWindowLongPtrA on invalid window handle should have returned 0 instead of 0x%lx\n", retval);
ok(check_error(GetLastError(), ERROR_INVALID_WINDOW_HANDLE),
- "SetWindowLongPtr should have set error to ERROR_INVALID_WINDOW_HANDLE instad of %d\n", GetLastError());
+ "SetWindowLongPtrA should have set error to ERROR_INVALID_WINDOW_HANDLE instad of %d\n", GetLastError());
SetLastError(0xdeadbeef);
- retval = SetWindowLongPtr(hwndMain, 0xdeadbeef, 0);
- ok(!retval, "SetWindowLongPtr on invalid index should have returned 0 instead of 0x%lx\n", retval);
+ retval = SetWindowLongPtrA(hwndMain, 0xdeadbeef, 0);
+ ok(!retval, "SetWindowLongPtrA on invalid index should have returned 0 instead of 0x%lx\n", retval);
ok(check_error(GetLastError(), ERROR_INVALID_INDEX),
- "SetWindowLongPtr should have set error to ERROR_INVALID_INDEX instad of %d\n", GetLastError());
+ "SetWindowLongPtrA should have set error to ERROR_INVALID_INDEX instad of %d\n", GetLastError());
SetLastError(0xdeadbeef);
- retval = SetWindowLongPtr(hwndMain, GWLP_WNDPROC, 0);
+ 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());
- retval = GetWindowLongPtr(hwndMain, GWLP_WNDPROC);
+ "SetWindowLongPtrA on invalid window proc should have returned address of main_window_procA instead of 0x%lx\n", retval);
+ ok(GetLastError() == 0xdeadbeef, "SetWindowLongPtrA shouldn't have set the last error, instead of setting it to %d\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);
+ "SetWindowLongPtrA on invalid window proc shouldn't have changed the value returned by GetWindowLongPtrA, instead of changing it to 0x%lx\n", retval);
ok(!IsWindowUnicode(hwndMain), "hwndMain shouldn't be Unicode\n");
old_window_procW = (WNDPROC)GetWindowLongPtrW(hwndMain, GWLP_WNDPROC);
@@ -4051,14 +4051,14 @@ 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, "SetWindowLongPtrA shouldn't have set the last error, instead of setting it to %d\n", GetLastError());
+ ok(retval != 0, "SetWindowLongPtrA error %d\n", GetLastError());
ok((WNDPROC)retval == old_window_procW,
- "SetWindowLongPtr on invalid window proc shouldn't have changed the value returned by GetWindowLongPtr, instead of changing it to 0x%lx\n", retval);
+ "SetWindowLongPtrA on invalid window proc shouldn't have changed the value returned by GetWindowLongPtrA, instead of changing it to 0x%lx\n", retval);
ok(IsWindowUnicode(hwndMain), "hwndMain should now be Unicode\n");
/* set it back to ANSI */
- SetWindowLongPtr(hwndMain, GWLP_WNDPROC, 0);
+ SetWindowLongPtrA(hwndMain, GWLP_WNDPROC, 0);
}
}
--
1.5.0.6
More information about the wine-patches
mailing list