Fix toolbar command notification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The toolbar commands are not sent to the correct notification window.

Dave Hawkes

Index: comctl32/toolbar.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/toolbar.c,v
retrieving revision 1.95
diff -u -r1.95 toolbar.c
--- comctl32/toolbar.c	2001/12/01 00:37:41	1.95
+++ comctl32/toolbar.c	2001/12/05 16:16:55
@@ -4385,7 +4385,7 @@
 			TBN_ENDDRAG);
 
 	if (bSendMessage)
-	    SendMessageA (GetParent(hwnd), WM_COMMAND,
+	    SendMessageA (infoPtr->hwndNotify, WM_COMMAND,
 			  MAKEWPARAM(btnPtr->idCommand, 0), (LPARAM)hwnd);
 
 	/* !!! Undocumented - toolbar at 4.71 level and above sends
@@ -5194,7 +5194,13 @@
 	case WM_DRAWITEM:
 	case WM_MEASUREITEM:
 	case WM_VKEYTOITEM:
-	    return SendMessageA (GetParent (hwnd), uMsg, wParam, lParam);
+	    {
+                TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
+                if(infoPtr != NULL)
+                    return SendMessageA (infoPtr->hwndNotify, uMsg, wParam, lParam);
+                else
+                    return SendMessageA (GetParent (hwnd), uMsg, wParam, lParam);
+            }
 
 	default:
 	    if (uMsg >= WM_USER)

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux