Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e508eae7
Commit
e508eae7
authored
Feb 12, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Update ticks on TBM_SETRANGE.
parent
11de98be
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
trackbar.c
dlls/comctl32/tests/trackbar.c
+9
-0
trackbar.c
dlls/comctl32/trackbar.c
+10
-4
No files found.
dlls/comctl32/tests/trackbar.c
View file @
e508eae7
...
...
@@ -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
);
}
...
...
dlls/comctl32/trackbar.c
View file @
e508eae7
...
...
@@ -1151,10 +1151,13 @@ TRACKBAR_SetPos (TRACKBAR_INFO *infoPtr, BOOL fPosition, LONG lPosition)
static
inline
LRESULT
TRACKBAR_SetRange
(
TRACKBAR_INFO
*
infoPtr
,
BOOL
fRedraw
,
LONG
lR
ange
)
TRACKBAR_SetRange
(
TRACKBAR_INFO
*
infoPtr
,
BOOL
redraw
,
LONG
r
ange
)
{
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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment