https://bugs.winehq.org/show_bug.cgi?id=45136
Bug ID: 45136 Summary: Wine does not behave as Windows when using TBM_SETPAGESIZE call before TBM_SETRANGE Product: Wine Version: unspecified Hardware: x86 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: comctl32 Assignee: wine-bugs@winehq.org Reporter: patrick.maillot@gmail.com
The TBM_SETPAGESIZE message can be called before a TBM_SETRANGE message in Windows and this will not affect the value or behavior of the TBM_SETPAGESIZE parameter.
Wine's function 'TRACKBAR_SetRangeMin', at line 1288 of file https://github.com/wine-mirror/wine/blob/master/dlls/comctl32/trackbar.c force sets the Wine 'lPageSize' value ( infoPtr->lPageSize = (infoPtr->lRangeMax - infoPtr->lRangeMin) / 5;). So when TBM_SETRANGE message is sent after a TBM_SETPAGESIZE message, the TBM_SETPAGESIZE parameter is reset. This is not the Windows behavior.
A quick fix is to ensure in Windows one always calls TBM_SETPAGESIZE parameter after TBM_SETRANGE. A better fix would be not to force update the lPageSize variable in the TRACKBAR_SetRangeMin function.