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
b7d7d589
Commit
b7d7d589
authored
Mar 23, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/trackbar: Fix reverting to default value for TBM_SETPAGESIZE with lParam = -1.
parent
92b0ad98
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
5 deletions
+24
-5
trackbar.c
dlls/comctl32/tests/trackbar.c
+17
-3
trackbar.c
dlls/comctl32/trackbar.c
+7
-2
No files found.
dlls/comctl32/tests/trackbar.c
View file @
b7d7d589
...
...
@@ -588,12 +588,26 @@ static void test_page_size(HWND hWndTrackbar){
/* test TBM_GETPAGESIZE */
r
=
SendMessage
(
hWndTrackbar
,
TBM_GETPAGESIZE
,
0
,
0
);
todo_wine
{
expect
(
20
,
r
);
}
expect
(
20
,
r
);
ok_sequence
(
sequences
,
TRACKBAR_SEQ_INDEX
,
page_size_test_seq
,
"page size test sequence"
,
FALSE
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
parent_empty_test_seq
,
"parent page size test sequence"
,
FALSE
);
/* check for zero page size */
r
=
SendMessage
(
hWndTrackbar
,
TBM_SETPAGESIZE
,
0
,
0
);
expect
(
20
,
r
);
r
=
SendMessage
(
hWndTrackbar
,
TBM_GETPAGESIZE
,
0
,
0
);
expect
(
0
,
r
);
/* revert to default */
r
=
SendMessage
(
hWndTrackbar
,
TBM_SETPAGESIZE
,
0
,
-
1
);
expect
(
0
,
r
);
r
=
SendMessage
(
hWndTrackbar
,
TBM_GETPAGESIZE
,
0
,
0
);
expect
(
20
,
r
);
/* < -1 */
r
=
SendMessage
(
hWndTrackbar
,
TBM_SETPAGESIZE
,
0
,
-
2
);
expect
(
20
,
r
);
r
=
SendMessage
(
hWndTrackbar
,
TBM_GETPAGESIZE
,
0
,
0
);
expect
(
-
2
,
r
);
}
static
void
test_position
(
HWND
hWndTrackbar
){
...
...
dlls/comctl32/trackbar.c
View file @
b7d7d589
...
...
@@ -81,6 +81,8 @@ typedef struct
#define TOOLTIP_OFFSET 2
/* distance from ctrl edge to tooltip */
#define TB_DEFAULTPAGESIZE 20
/* Used by TRACKBAR_Refresh to find out which parts of the control
need to be recalculated */
...
...
@@ -1128,7 +1130,10 @@ TRACKBAR_SetPageSize (TRACKBAR_INFO *infoPtr, LONG lPageSize)
{
LONG
lTemp
=
infoPtr
->
lPageSize
;
infoPtr
->
lPageSize
=
lPageSize
;
if
(
lPageSize
!=
-
1
)
infoPtr
->
lPageSize
=
lPageSize
;
else
infoPtr
->
lPageSize
=
TB_DEFAULTPAGESIZE
;
return
lTemp
;
}
...
...
@@ -1405,7 +1410,7 @@ TRACKBAR_Create (HWND hwnd, const CREATESTRUCTW *lpcs)
infoPtr
->
lRangeMin
=
0
;
infoPtr
->
lRangeMax
=
100
;
infoPtr
->
lLineSize
=
1
;
infoPtr
->
lPageSize
=
20
;
infoPtr
->
lPageSize
=
TB_DEFAULTPAGESIZE
;
infoPtr
->
lSelMin
=
0
;
infoPtr
->
lSelMax
=
0
;
infoPtr
->
lPos
=
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