header: handle the notification window properly

Dimitrie O. Paun dpaun at rogers.com
Wed Nov 19 14:02:11 CST 2003


ChangeLog
    Make header send its notifications to the parent window passed
    to it in CREATESTRUCT.  Based on a treeview patch by Igor Grahek.

Index: dlls/comctl32/header.c
===================================================================
RCS file: /var/cvs/wine/dlls/comctl32/header.c,v
retrieving revision 1.61
diff -u -r1.61 header.c
--- dlls/comctl32/header.c	14 Oct 2003 20:13:42 -0000	1.61
+++ dlls/comctl32/header.c	3 Nov 2003 21:34:29 -0000
@@ -199,7 +199,7 @@
 	dis.rcItem     = r;
 	dis.itemData   = phdi->lParam;
         oldBkMode = SetBkMode(hdc, TRANSPARENT);
-	SendMessageA (GetParent (hwnd), WM_DRAWITEM,
+	SendMessageA (infoPtr->hwndNotify, WM_DRAWITEM,
 			(WPARAM)dis.CtlID, (LPARAM)&dis);
         if (oldBkMode != TRANSPARENT)
             SetBkMode(hdc, oldBkMode);
@@ -1287,7 +1287,7 @@
     infoPtr = (HEADER_INFO *)Alloc (sizeof(HEADER_INFO));
     SetWindowLongA (hwnd, 0, (DWORD)infoPtr);
 
-    infoPtr->hwndNotify = GetParent(hwnd);
+    infoPtr->hwndNotify = ((LPCREATESTRUCTA)lParam)->hwndParent;
     infoPtr->uNumItem = 0;
     infoPtr->hFont = 0;
     infoPtr->items = 0;

-- 
Dimi.




More information about the wine-patches mailing list