hotkey: handle the notification window properly

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


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

Index: dlls/comctl32/hotkey.c
===================================================================
RCS file: /var/cvs/wine/dlls/comctl32/hotkey.c,v
retrieving revision 1.27
diff -u -r1.27 hotkey.c
--- dlls/comctl32/hotkey.c	22 Sep 2003 21:32:34 -0000	1.27
+++ dlls/comctl32/hotkey.c	19 Nov 2003 02:38:57 -0000
@@ -38,6 +38,7 @@
 typedef struct tagHOTKEY_INFO
 {
     HWND  hwndSelf;
+    HWND  hwndNotify;
     HFONT hFont;
     BOOL  bFocus;
     INT   nHeight;
@@ -222,6 +223,7 @@
     infoPtr->HotKey = infoPtr->InvComb = infoPtr->InvMod = infoPtr->CurrMod = 0;
     infoPtr->CaretPos = 2;
     infoPtr->hwndSelf = hwnd;
+    infoPtr->hwndNotify = ((LPCREATESTRUCTA)lParam)->hwndParent;
     LoadStringW(COMCTL32_hModule, HKY_NONE, infoPtr->strNone, 15);
 
     /* get default font height */
@@ -252,7 +254,7 @@
     RECT   rc;
 
     hBrush =
-	(HBRUSH)SendMessageW (GetParent (infoPtr->hwndSelf), WM_CTLCOLOREDIT,
+	(HBRUSH)SendMessageW (infoPtr->hwndNotify, WM_CTLCOLOREDIT,
 				wParam, (LPARAM)infoPtr->hwndSelf);
     if (hBrush)
 	hBrush = (HBRUSH)GetStockObject (WHITE_BRUSH);

-- 
Dimi.




More information about the wine-patches mailing list