mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:43:31 +00:00
comctl32: Update ticks on TBM_SETRANGE.
This commit is contained in:
parent
11de98be34
commit
e508eae7d7
2 changed files with 19 additions and 4 deletions
|
@ -1034,6 +1034,15 @@ static void test_TBS_AUTOTICKS(void)
|
|||
ret = SendMessage(hWnd, TBM_GETNUMTICS, 0, 0);
|
||||
expect(91, ret);
|
||||
|
||||
ret = SendMessage(hWnd, TBM_SETRANGEMIN, TRUE, 0);
|
||||
expect(0, ret);
|
||||
|
||||
/* TBM_SETRANGE rebuilds tics */
|
||||
ret = SendMessage(hWnd, TBM_SETRANGE, TRUE, MAKELONG(10, 200));
|
||||
expect(0, ret);
|
||||
ret = SendMessage(hWnd, TBM_GETNUMTICS, 0, 0);
|
||||
expect(191, ret);
|
||||
|
||||
DestroyWindow(hWnd);
|
||||
}
|
||||
|
||||
|
|
|
@ -1151,10 +1151,13 @@ TRACKBAR_SetPos (TRACKBAR_INFO *infoPtr, BOOL fPosition, LONG lPosition)
|
|||
|
||||
|
||||
static inline LRESULT
|
||||
TRACKBAR_SetRange (TRACKBAR_INFO *infoPtr, BOOL fRedraw, LONG lRange)
|
||||
TRACKBAR_SetRange (TRACKBAR_INFO *infoPtr, BOOL redraw, LONG range)
|
||||
{
|
||||
infoPtr->lRangeMin = (SHORT)LOWORD(lRange);
|
||||
infoPtr->lRangeMax = (SHORT)HIWORD(lRange);
|
||||
BOOL changed = infoPtr->lRangeMin != (SHORT)LOWORD(range) ||
|
||||
infoPtr->lRangeMax != (SHORT)HIWORD(range);
|
||||
|
||||
infoPtr->lRangeMin = (SHORT)LOWORD(range);
|
||||
infoPtr->lRangeMax = (SHORT)HIWORD(range);
|
||||
|
||||
if (infoPtr->lPos < infoPtr->lRangeMin) {
|
||||
infoPtr->lPos = infoPtr->lRangeMin;
|
||||
|
@ -1169,7 +1172,10 @@ TRACKBAR_SetRange (TRACKBAR_INFO *infoPtr, BOOL fRedraw, LONG lRange)
|
|||
infoPtr->lPageSize = (infoPtr->lRangeMax - infoPtr->lRangeMin) / 5;
|
||||
if (infoPtr->lPageSize == 0) infoPtr->lPageSize = 1;
|
||||
|
||||
if (fRedraw) TRACKBAR_InvalidateAll(infoPtr);
|
||||
if (changed && (infoPtr->dwStyle & TBS_AUTOTICKS))
|
||||
TRACKBAR_RecalculateTics (infoPtr);
|
||||
|
||||
if (redraw) TRACKBAR_InvalidateAll(infoPtr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue