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
b2917cf5
Commit
b2917cf5
authored
Apr 10, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/updown: Allow ranges with max < min for Up/Down control.
parent
8320686f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
12 deletions
+27
-12
updown.c
dlls/comctl32/updown.c
+27
-12
No files found.
dlls/comctl32/updown.c
View file @
b2917cf5
...
...
@@ -470,6 +470,27 @@ static LRESULT UPDOWN_KeyPressed(UPDOWN_INFO *infoPtr, int key)
}
/***********************************************************************
* UPDOWN_SetRange
*
* Handle UDM_SETRANGE, UDM_SETRANGE32
*
* FIXME: handle Max == Min properly:
* - arrows should be disabled (without WS_DISABLED set),
* visually they can't be pressed and don't respond;
* - all input messages should still pass in.
*/
static
LRESULT
UPDOWN_SetRange
(
UPDOWN_INFO
*
infoPtr
,
INT
Max
,
INT
Min
)
{
infoPtr
->
MaxVal
=
Max
;
infoPtr
->
MinVal
=
Min
;
TRACE
(
"UpDown Ctrl new range(%d to %d), hwnd=%p
\n
"
,
infoPtr
->
MinVal
,
infoPtr
->
MaxVal
,
infoPtr
->
Self
);
return
0
;
}
/***********************************************************************
* UPDOWN_MouseWheel
*
* Handle mouse wheel scrolling
...
...
@@ -1045,12 +1066,11 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
return
MAKELONG
(
infoPtr
->
MaxVal
,
infoPtr
->
MinVal
);
case
UDM_SETRANGE
:
/* we must have: */
infoPtr
->
MaxVal
=
(
short
)(
lParam
);
/* UD_MINVAL <= Max <= UD_MAXVAL */
infoPtr
->
MinVal
=
(
short
)
HIWORD
(
lParam
);
/* UD_MINVAL <= Min <= UD_MAXVAL */
/* |Max-Min| <= UD_MAXVAL */
TRACE
(
"UpDown Ctrl new range(%d to %d), hwnd=%p
\n
"
,
infoPtr
->
MinVal
,
infoPtr
->
MaxVal
,
hwnd
);
/* we must have:
UD_MINVAL <= Max <= UD_MAXVAL
UD_MINVAL <= Min <= UD_MAXVAL
|Max-Min| <= UD_MAXVAL */
UPDOWN_SetRange
(
infoPtr
,
(
short
)
lParam
,
(
short
)
HIWORD
(
lParam
));
break
;
case
UDM_GETRANGE32
:
...
...
@@ -1059,12 +1079,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
break
;
case
UDM_SETRANGE32
:
infoPtr
->
MinVal
=
(
INT
)
wParam
;
infoPtr
->
MaxVal
=
(
INT
)
lParam
;
if
(
infoPtr
->
MaxVal
<=
infoPtr
->
MinVal
)
infoPtr
->
MaxVal
=
infoPtr
->
MinVal
+
1
;
TRACE
(
"UpDown Ctrl new range(%d to %d), hwnd=%p
\n
"
,
infoPtr
->
MinVal
,
infoPtr
->
MaxVal
,
hwnd
);
UPDOWN_SetRange
(
infoPtr
,
(
INT
)
lParam
,
(
INT
)
wParam
);
break
;
case
UDM_GETPOS32
:
...
...
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