up-down control default range

Kevin Groeneveld kgroeneveld at mcmaster.ca
Fri Aug 29 19:20:07 CDT 2003


Recently I found a windows program where the up-down control works
backwards when run in wine compared to windows.  I tracked the problem
to the fact that wine has a default range of 0 - 9999 on the up-down
control but windows has a default range of 100 - 0.

I could not find anything in msdn which directly states what the default
for the up-down control range should be, but msdn does state in the
CSpinButtonCtrl::SetRange documenation that the default range is 100 -
0.  I checked the MFC source and it does not set this default range, so
this does indirectly suggest the default range on the up-down control
should be 100 - 0.

Changelog:
  Kevin Groeneveld <kgroeneveld at mcmaster.ca>
  Change default range of up-down control to match range used in window.

-------------- next part --------------
diff -ur wine-20030813/dlls/comctl32/updown.c wine-20030813.patched/dlls/comctl32/updown.c
--- wine-20030813/dlls/comctl32/updown.c	2003-08-23 23:12:30.000000000 -0400
+++ wine-20030813.patched/dlls/comctl32/updown.c	2003-08-24 14:49:04.000000000 -0400
@@ -722,8 +722,8 @@
 	    infoPtr->AccelVect = 0;
 	    infoPtr->AccelIndex = -1;
 	    infoPtr->CurVal = 0;
-	    infoPtr->MinVal = 0;
-	    infoPtr->MaxVal = 9999;
+	    infoPtr->MinVal = 100;
+	    infoPtr->MaxVal = 0;
 	    infoPtr->Base  = 10; /* Default to base 10  */
 	    infoPtr->Buddy = 0;  /* No buddy window yet */
 	    infoPtr->Flags = 0;  /* And no flags        */


More information about the wine-patches mailing list