Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
abde0c21
Commit
abde0c21
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_SETRANGEMAX.
parent
668e44ab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
2 deletions
+45
-2
trackbar.c
dlls/comctl32/tests/trackbar.c
+38
-0
trackbar.c
dlls/comctl32/trackbar.c
+7
-2
No files found.
dlls/comctl32/tests/trackbar.c
View file @
abde0c21
...
...
@@ -982,6 +982,43 @@ static void test_initial_state(void)
expect
(
-
1
,
ret
);
ret
=
SendMessage
(
hWnd
,
TBM_GETTICPOS
,
0
,
0
);
expect
(
-
1
,
ret
);
ret
=
SendMessage
(
hWnd
,
TBM_GETRANGEMIN
,
0
,
0
);
expect
(
0
,
ret
);
ret
=
SendMessage
(
hWnd
,
TBM_GETRANGEMAX
,
0
,
0
);
expect
(
100
,
ret
);
ret
=
SendMessage
(
hWnd
,
TBM_SETRANGEMAX
,
TRUE
,
200
);
expect
(
0
,
ret
);
ret
=
SendMessage
(
hWnd
,
TBM_GETNUMTICS
,
0
,
0
);
expect
(
2
,
ret
);
DestroyWindow
(
hWnd
);
}
static
void
test_TBS_AUTOTICKS
(
void
)
{
HWND
hWnd
;
int
ret
;
hWnd
=
create_trackbar
(
TBS_AUTOTICKS
,
hWndParent
);
ret
=
SendMessage
(
hWnd
,
TBM_GETNUMTICS
,
0
,
0
);
expect
(
2
,
ret
);
ret
=
SendMessage
(
hWnd
,
TBM_GETTIC
,
0
,
0
);
expect
(
-
1
,
ret
);
ret
=
SendMessage
(
hWnd
,
TBM_GETTICPOS
,
0
,
0
);
expect
(
-
1
,
ret
);
ret
=
SendMessage
(
hWnd
,
TBM_GETRANGEMIN
,
0
,
0
);
expect
(
0
,
ret
);
ret
=
SendMessage
(
hWnd
,
TBM_GETRANGEMAX
,
0
,
0
);
expect
(
100
,
ret
);
ret
=
SendMessage
(
hWnd
,
TBM_SETRANGEMAX
,
TRUE
,
200
);
expect
(
0
,
ret
);
ret
=
SendMessage
(
hWnd
,
TBM_GETNUMTICS
,
0
,
0
);
expect
(
201
,
ret
);
DestroyWindow
(
hWnd
);
}
...
...
@@ -1031,6 +1068,7 @@ START_TEST(trackbar)
test_tic_placement
(
hWndTrackbar
);
test_tool_tips
(
hWndTrackbar
);
test_unicode
(
hWndTrackbar
);
test_TBS_AUTOTICKS
();
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCE
);
DestroyWindow
(
hWndTrackbar
);
...
...
dlls/comctl32/trackbar.c
View file @
abde0c21
...
...
@@ -1176,8 +1176,10 @@ TRACKBAR_SetRange (TRACKBAR_INFO *infoPtr, BOOL fRedraw, LONG lRange)
static
inline
LRESULT
TRACKBAR_SetRangeMax
(
TRACKBAR_INFO
*
infoPtr
,
BOOL
fR
edraw
,
LONG
lMax
)
TRACKBAR_SetRangeMax
(
TRACKBAR_INFO
*
infoPtr
,
BOOL
r
edraw
,
LONG
lMax
)
{
BOOL
changed
=
infoPtr
->
lRangeMax
!=
lMax
;
infoPtr
->
lRangeMax
=
lMax
;
if
(
infoPtr
->
lPos
>
infoPtr
->
lRangeMax
)
{
infoPtr
->
lPos
=
infoPtr
->
lRangeMax
;
...
...
@@ -1187,7 +1189,10 @@ TRACKBAR_SetRangeMax (TRACKBAR_INFO *infoPtr, BOOL fRedraw, LONG lMax)
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