[PATCH 1/3] Restore original procedure to let control clean up
Nikolay Sivov
bunglehead at gmail.com
Wed Dec 2 14:03:21 CST 2009
---
dlls/user32/tests/class.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/dlls/user32/tests/class.c b/dlls/user32/tests/class.c
index 7b42ce3..940550e 100644
--- a/dlls/user32/tests/class.c
+++ b/dlls/user32/tests/class.c
@@ -707,6 +707,7 @@ static void test_builtinproc(void)
oldproc = (WNDPROC)SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (LONG_PTR)ClassTest_WndProc);
ok(IS_WNDPROC_HANDLE(oldproc) == FALSE, "Class %s shouldn't return a handle\n", NORMAL_CLASSES[i]);
+ SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (LONG_PTR)oldproc);
DestroyWindow(hwnd);
}
@@ -747,6 +748,8 @@ static void test_builtinproc(void)
CallWindowProcW((WNDPROC)GetWindowLongPtrW(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf);
ok(memcmp(buf, classW, sizeof(classW)) == 0, "WM_GETTEXT invalid return\n");
+ SetWindowLongPtrA(hwnd, GWLP_WNDPROC, (LONG_PTR)oldproc);
+
DestroyWindow(hwnd);
hwnd = CreateWindowA(WC_EDITA, classA, WS_OVERLAPPEDWINDOW,
@@ -768,7 +771,7 @@ static void test_builtinproc(void)
CallWindowProcW((WNDPROC)GetWindowLongPtrW(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf);
ok(memcmp(buf, classW, sizeof(classW)) == 0, "WM_GETTEXT invalid return\n");
- SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (LONG_PTR)ClassTest_WndProc);
+ oldproc = (WNDPROC)SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (LONG_PTR)ClassTest_WndProc);
SetWindowTextW(hwnd, unistring);
CallWindowProcW((WNDPROC)GetWindowLongPtrW(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf);
ok(memcmp(buf, unistring, sizeof(unistring)) == 0, "WM_GETTEXT invalid return\n");
@@ -781,6 +784,8 @@ static void test_builtinproc(void)
CallWindowProcA((WNDPROC)GetWindowLongPtrA(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf);
ok(memcmp(buf, classA, sizeof(classA)) == 0, "WM_GETTEXT invalid return\n");
+ SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (LONG_PTR)oldproc);
+
DestroyWindow(hwnd);
}
--
1.5.6.5
--=-uaSj8FC+SrcoT2Qllnxy--
More information about the wine-patches
mailing list