Module: wine Branch: master Commit: 1d658d4bb78d2476c467da420088a9ffc74767f9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1d658d4bb78d2476c467da4200...
Author: David Hedberg david.hedberg@gmail.com Date: Sun Jul 18 14:51:48 2010 +0200
shell32/tests: Try harder to subclass the listview.
---
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);