https://bugs.winehq.org/show_bug.cgi?id=41909
Bug ID: 41909 Summary: Calling TBM_SETPOS after TBM_SETRANGEMIN/TBM_SETRANGEMAX does not draw slider control properly Product: Wine Version: 1.9.23 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: wine@sagagames.de Distribution: ---
The default range for a slider is 0 to 100, so the value 0 is on the left side of the slider (assuming a horizontal slider).
I have a slider control ranging from -500 to +500, the range is being set using TBM_SETRANGEMIN / TBM_SETRANGEMAX. This means that the value 0 should be precisely in the middle. However, after calling TBM_SETPOS with a parameter of 0, the slider stays at the left side of the control, even though it should now be located in the middle. This works as expected on Windows, but not in Wine 1.9 on latest Xubuntu.
Code to reproduce: SendMessage(hWnd, TBM_TBM_SETRANGEMIN, FALSE, -500); SendMessage(hWnd, TBM_TBM_SETRANGEMAX, FALSE, 500); SendMessage(hWnd, TBM_SETPOS, TRUE, 0);