TreeView control - set correct hwndNotify

Igor Grahek igorg at cadlink.com
Mon Sep 22 11:41:44 CDT 2003


Is there a reason why this is not accepted?

ChangeLog: - TreeView control set Notify window correctly in case that
window style is WS_POPUP.

------- patch begin -----------
Index: dlls/comctl32/treeview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/treeview.c,v
retrieving revision 1.125
diff -u -r1.125 treeview.c
--- dlls/comctl32/treeview.c	5 Sep 2003 23:08:42 -0000	1.125
+++ dlls/comctl32/treeview.c	9 Sep 2003 19:26:47 -0000
@@ -4730,7 +4730,7 @@
 /* Create/Destroy
*******************************************************/
 
 static LRESULT
-TREEVIEW_Create(HWND hwnd)
+TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
 {
     RECT rcClient;
     TREEVIEW_INFO *infoPtr;
@@ -4809,7 +4809,10 @@
     infoPtr->root->iLevel = -1;
     infoPtr->root->visibleOrder = -1;
 
-    infoPtr->hwndNotify = GetParent(hwnd);
+    infoPtr->hwndNotify = lpcs->hwndParent;
+    if(!IsWindow(infoPtr->hwndNotify))
+        infoPtr->hwndNotify = GetParent(hwnd);
+
 #if 0
     infoPtr->bTransparent = ( GetWindowLongA( hwnd, GWL_STYLE) &
TBSTYLE_FLAT);
 #endif
@@ -5188,7 +5191,7 @@
     else
     {
 	if (uMsg == WM_CREATE)
-	    TREEVIEW_Create(hwnd);
+	    TREEVIEW_Create(hwnd, (LPCREATESTRUCTW)lParam);
 	else
 	    goto def;
     }
------- patch end -------------

Igor




More information about the wine-patches mailing list