Re: Win32Lib Error Fixes
- Posted by CChris <christian.cuvier at agricultu?e.gouv.f?> May 01, 2008
- 698 views
C Bouzy wrote: > > Hello CChris, > > I have been using Win32Lib since 2001 for all of my apps :) The error is in > setScrollRange, just replace all 3 instances. > We are, I think, both right. getScrollRange() checks whether the bar is horizontal or vertical, and returns item 1 or 2 in ctrl_Range[id] accordingly. Since a progressbar or somesuch may be either horizontal or vertical, both fields should be ranges, and your fix works. However, all controls have one range to take care of, except Window. So, leaving setScrollRange() alone and changing getScrollRange() should work just as well. I prefer the latter as more consistent. Could you tell me whether that way works for you? CChris > In regards to DefProcessing, the code I posted might seem redundant but it is > not. In some cases when running large complex Win32Lib apps on some machines > you will get a weird error, that simple piece of code fixes it. > Ok, but is the error simply lResult being uninitialised, or lResult holding something unexpected? Just curious here. CChris > ~ C Bouzy > > "If you do what you have always done, you will get what you always got."