Updown fix

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

 



Changelog:
  Allow the application to subclass a buddy edit
  (spotted by Guy L. Albertelli).

Index: dlls/comctl32/updown.c
===================================================================
RCS file: /var/cvs/wine/dlls/comctl32/updown.c,v
retrieving revision 1.41
diff -u -r1.41 updown.c
--- dlls/comctl32/updown.c	31 May 2002 23:25:44 -0000	1.41
+++ dlls/comctl32/updown.c	16 Jul 2002 12:13:16 -0000
@@ -447,7 +447,7 @@
     DWORD dwStyle = GetWindowLongW (infoPtr->Self, GWL_STYLE);
     RECT  budRect;  /* new coord for the buddy */
     int   x, width;  /* new x position and width for the up-down */
-    WNDPROC baseWndProc, currWndProc;
+    WNDPROC baseWndProc;
     CHAR buddyClass[40];
 
     /* Is it a valid bud? */
@@ -477,8 +477,7 @@
         /* Note that I don't clear the BUDDY_SUPERCLASS_WNDPROC property
            when we reset the upDown ctrl buddy to another buddy because it is not
            good to break the window proc chain. */
-	currWndProc = (WNDPROC) GetWindowLongW(bud, GWL_WNDPROC);
-	if (currWndProc != UPDOWN_Buddy_SubclassProc) {
+	if (!GetPropA(bud, BUDDY_SUPERCLASS_WNDPROC)) {
 	    baseWndProc = (WNDPROC)SetWindowLongW(bud, GWL_WNDPROC, (LPARAM)UPDOWN_Buddy_SubclassProc);
  	    SetPropA(bud, BUDDY_SUPERCLASS_WNDPROC, (HANDLE)baseWndProc);
 	}
@@ -939,7 +938,7 @@
 	    return temp;
 
 	default:
-	    if (message >= WM_USER)
+	    if ((message >= WM_USER) && (message < WM_APP))
 	     	ERR("unknown msg %04x wp=%04x lp=%08lx\n", message, wParam, lParam);
 	    return DefWindowProcW (hwnd, message, wParam, lParam);
     }


-- 
Dimi.



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

  Powered by Linux