comparison os2/dw.c @ 1195:9b021f787ad1

Fix issues with OS/2 percent bar at the upper end of range.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 28 Sep 2011 15:29:05 +0000
parents 76262040ed5f
children 452a5b1b2aa5
comparison
equal deleted inserted replaced
1194:d2f37fda40df 1195:9b021f787ad1
6733 WinSendMsg(handle, SLM_SETSLIDERINFO, MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_RANGEVALUE), (MPARAM)0); 6733 WinSendMsg(handle, SLM_SETSLIDERINFO, MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_RANGEVALUE), (MPARAM)0);
6734 } 6734 }
6735 else if(range) 6735 else if(range)
6736 { 6736 {
6737 /* Otherwise set the position as usual */ 6737 /* Otherwise set the position as usual */
6738 int mypos = ((float)position/100)*range; 6738 int mypos = (((float)position)/100)*range;
6739
6740 if(mypos >= range)
6741 mypos = range - 1;
6739 6742
6740 _dw_int_set(handle, mypos); 6743 _dw_int_set(handle, mypos);
6741 WinSendMsg(handle, SLM_SETSLIDERINFO, MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_RANGEVALUE), (MPARAM)mypos); 6744 WinSendMsg(handle, SLM_SETSLIDERINFO, MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_RANGEVALUE), (MPARAM)mypos);
6742 } 6745 }
6743 } 6746 }