updown: style fix

Dimi Paun dimi at lattica.com
Wed May 11 00:33:24 CDT 2005


People complained that it's too obscure.
Maybe they are right.

ChangeLog
    Make it more explicit how we deal with WS_DISABLED.

Index: dlls/comctl32/updown.c
===================================================================
RCS file: /var/cvs/wine/dlls/comctl32/updown.c,v
retrieving revision 1.67
diff -u -p -r1.67 updown.c
--- dlls/comctl32/updown.c	14 Apr 2005 13:58:45 -0000	1.67
+++ dlls/comctl32/updown.c	11 May 2005 05:29:51 -0000
@@ -775,9 +775,12 @@ static LRESULT WINAPI UpDownWindowProc(H
 	    break;
 
 	case WM_ENABLE:
-	    infoPtr->dwStyle &= ~WS_DISABLED;
-	    infoPtr->dwStyle |= (wParam ? 0 : WS_DISABLED);
-	    if (infoPtr->dwStyle & WS_DISABLED) UPDOWN_CancelMode (infoPtr);
+	    if (wParam) {
+		infoPtr->dwStyle &= ~WS_DISABLED;
+	    } else {
+		infoPtr->dwStyle |= WS_DISABLED;
+	    	UPDOWN_CancelMode (infoPtr);
+	    }
 	    InvalidateRect (infoPtr->Self, NULL, FALSE);
 	    break;
 



-- 
Dimi Paun <dimi at lattica.com>
Lattica, Inc.




More information about the wine-patches mailing list