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
9e849c00
Commit
9e849c00
authored
Sep 17, 2003
by
Mike Hearn
Committed by
Alexandre Julliard
Sep 17, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented mouse wheel support.
parent
add0c585
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
winhelp.c
programs/winhelp/winhelp.c
+31
-0
No files found.
programs/winhelp/winhelp.c
View file @
9e849c00
...
...
@@ -24,6 +24,7 @@
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <stdlib.h>
#include "windef.h"
#include "winbase.h"
...
...
@@ -811,6 +812,36 @@ static LRESULT CALLBACK WINHELP_TextWndProc(HWND hWnd, UINT msg, WPARAM wParam,
if
(
!
(
winpos
->
flags
&
SWP_NOSIZE
))
WINHELP_SetupText
(
hWnd
);
break
;
case
WM_MOUSEWHEEL
:
{
int
wheelDelta
=
0
;
UINT
scrollLines
=
3
;
int
curPos
=
GetScrollPos
(
hWnd
,
SB_VERT
);
int
min
,
max
;
GetScrollRange
(
hWnd
,
SB_VERT
,
&
min
,
&
max
);
SystemParametersInfo
(
SPI_GETWHEELSCROLLLINES
,
0
,
&
scrollLines
,
0
);
if
(
wParam
&
(
MK_SHIFT
|
MK_CONTROL
))
return
DefWindowProc
(
hWnd
,
msg
,
wParam
,
lParam
);
wheelDelta
-=
GET_WHEEL_DELTA_WPARAM
(
wParam
);
if
(
abs
(
wheelDelta
)
>=
WHEEL_DELTA
&&
scrollLines
)
{
int
dy
;
curPos
+=
wheelDelta
;
if
(
curPos
>
max
)
curPos
=
max
;
else
if
(
curPos
<
min
)
curPos
=
min
;
dy
=
GetScrollPos
(
hWnd
,
SB_VERT
)
-
curPos
;
SetScrollPos
(
hWnd
,
SB_VERT
,
curPos
,
TRUE
);
ScrollWindow
(
hWnd
,
0
,
dy
,
NULL
,
NULL
);
UpdateWindow
(
hWnd
);
}
}
break
;
case
WM_VSCROLL
:
{
BOOL
update
=
TRUE
;
...
...
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