shell32/tests: Try harder to subclass the listview.
David Hedberg
david.hedberg at gmail.com
Sun Jul 18 07:51:48 CDT 2010
---
dlls/shell32/tests/shlview.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/dlls/shell32/tests/shlview.c b/dlls/shell32/tests/shlview.c
index e3e0ef2..e86518d 100644
--- a/dlls/shell32/tests/shlview.c
+++ b/dlls/shell32/tests/shlview.c
@@ -78,6 +78,16 @@ static HWND subclass_listview(HWND hwnd)
/* listview is a first child */
listview = FindWindowExA(hwnd, NULL, WC_LISTVIEWA, NULL);
+ if(!listview)
+ {
+ /* .. except for some versions of Windows XP, where things
+ are slightly more complicated. */
+ HWND hwnd_tmp;
+ hwnd_tmp = FindWindowExA(hwnd, NULL, "DUIViewWndClassName", NULL);
+ hwnd_tmp = FindWindowExA(hwnd_tmp, NULL, "DirectUIHWND", NULL);
+ hwnd_tmp = FindWindowExA(hwnd_tmp, NULL, "CtrlNotifySink", NULL);
+ listview = FindWindowExA(hwnd_tmp, NULL, WC_LISTVIEWA, NULL);
+ }
oldproc = (WNDPROC)SetWindowLongPtrA(listview, GWLP_WNDPROC,
(LONG_PTR)listview_subclass_proc);
--
1.7.1.1
More information about the wine-patches
mailing list