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
277c5139
Commit
277c5139
authored
Nov 30, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/treeview: Clean up winproc a bit, move parameter check to handlers.
parent
0506d3cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
treeview.c
dlls/comctl32/treeview.c
+14
-15
No files found.
dlls/comctl32/treeview.c
View file @
277c5139
...
@@ -4879,11 +4879,14 @@ scroll:
...
@@ -4879,11 +4879,14 @@ scroll:
}
}
static
LRESULT
static
LRESULT
TREEVIEW_MouseWheel
(
TREEVIEW_INFO
*
infoPtr
,
WPARAM
wParam
)
TREEVIEW_MouseWheel
(
TREEVIEW_INFO
*
infoPtr
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
short
gcWheelDelta
;
short
gcWheelDelta
;
UINT
pulScrollLines
=
3
;
UINT
pulScrollLines
=
3
;
if
(
wParam
&
(
MK_SHIFT
|
MK_CONTROL
))
return
DefWindowProcW
(
infoPtr
->
hwnd
,
WM_MOUSEWHEEL
,
wParam
,
lParam
);
if
(
infoPtr
->
firstVisible
==
NULL
)
if
(
infoPtr
->
firstVisible
==
NULL
)
return
TRUE
;
return
TRUE
;
...
@@ -5275,6 +5278,8 @@ TREEVIEW_MouseMove (TREEVIEW_INFO * infoPtr, LPARAM lParam)
...
@@ -5275,6 +5278,8 @@ TREEVIEW_MouseMove (TREEVIEW_INFO * infoPtr, LPARAM lParam)
TRACKMOUSEEVENT
trackinfo
;
TRACKMOUSEEVENT
trackinfo
;
TREEVIEW_ITEM
*
item
;
TREEVIEW_ITEM
*
item
;
if
(
!
(
infoPtr
->
dwStyle
&
TVS_TRACKSELECT
))
return
0
;
/* fill in the TRACKMOUSEEVENT struct */
/* fill in the TRACKMOUSEEVENT struct */
trackinfo
.
cbSize
=
sizeof
(
TRACKMOUSEEVENT
);
trackinfo
.
cbSize
=
sizeof
(
TRACKMOUSEEVENT
);
trackinfo
.
dwFlags
=
TME_QUERY
;
trackinfo
.
dwFlags
=
TME_QUERY
;
...
@@ -5314,7 +5319,7 @@ TREEVIEW_MouseMove (TREEVIEW_INFO * infoPtr, LPARAM lParam)
...
@@ -5314,7 +5319,7 @@ TREEVIEW_MouseMove (TREEVIEW_INFO * infoPtr, LPARAM lParam)
}
}
/* Draw themed border */
/* Draw themed border */
static
BOOL
nc_paint
(
const
TREEVIEW_INFO
*
infoPtr
,
HRGN
region
)
static
BOOL
TREEVIEW_NCPaint
(
const
TREEVIEW_INFO
*
infoPtr
,
HRGN
region
,
LPARAM
lParam
)
{
{
HTHEME
theme
=
GetWindowTheme
(
infoPtr
->
hwnd
);
HTHEME
theme
=
GetWindowTheme
(
infoPtr
->
hwnd
);
HDC
dc
;
HDC
dc
;
...
@@ -5323,7 +5328,8 @@ static BOOL nc_paint (const TREEVIEW_INFO *infoPtr, HRGN region)
...
@@ -5323,7 +5328,8 @@ static BOOL nc_paint (const TREEVIEW_INFO *infoPtr, HRGN region)
int
cxEdge
=
GetSystemMetrics
(
SM_CXEDGE
),
int
cxEdge
=
GetSystemMetrics
(
SM_CXEDGE
),
cyEdge
=
GetSystemMetrics
(
SM_CYEDGE
);
cyEdge
=
GetSystemMetrics
(
SM_CYEDGE
);
if
(
!
theme
)
return
FALSE
;
if
(
!
theme
)
return
DefWindowProcW
(
infoPtr
->
hwnd
,
WM_NCPAINT
,
(
WPARAM
)
region
,
lParam
);
GetWindowRect
(
infoPtr
->
hwnd
,
&
r
);
GetWindowRect
(
infoPtr
->
hwnd
,
&
r
);
...
@@ -5506,7 +5512,7 @@ TREEVIEW_KillFocus(const TREEVIEW_INFO *infoPtr)
...
@@ -5506,7 +5512,7 @@ TREEVIEW_KillFocus(const TREEVIEW_INFO *infoPtr)
}
}
/* update theme after a WM_THEMECHANGED message */
/* update theme after a WM_THEMECHANGED message */
static
LRESULT
theme_c
hanged
(
const
TREEVIEW_INFO
*
infoPtr
)
static
LRESULT
TREEVIEW_ThemeC
hanged
(
const
TREEVIEW_INFO
*
infoPtr
)
{
{
HTHEME
theme
=
GetWindowTheme
(
infoPtr
->
hwnd
);
HTHEME
theme
=
GetWindowTheme
(
infoPtr
->
hwnd
);
CloseThemeData
(
theme
);
CloseThemeData
(
theme
);
...
@@ -5706,10 +5712,7 @@ TREEVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -5706,10 +5712,7 @@ TREEVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return
TREEVIEW_MouseLeave
(
infoPtr
);
return
TREEVIEW_MouseLeave
(
infoPtr
);
case
WM_MOUSEMOVE
:
case
WM_MOUSEMOVE
:
if
(
infoPtr
->
dwStyle
&
TVS_TRACKSELECT
)
return
TREEVIEW_MouseMove
(
infoPtr
,
lParam
);
return
TREEVIEW_MouseMove
(
infoPtr
,
lParam
);
else
return
0
;
case
WM_NCLBUTTONDOWN
:
case
WM_NCLBUTTONDOWN
:
if
(
infoPtr
->
hwndEdit
)
if
(
infoPtr
->
hwndEdit
)
...
@@ -5717,9 +5720,7 @@ TREEVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -5717,9 +5720,7 @@ TREEVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
goto
def
;
goto
def
;
case
WM_NCPAINT
:
case
WM_NCPAINT
:
if
(
nc_paint
(
infoPtr
,
(
HRGN
)
wParam
))
return
TREEVIEW_NCPaint
(
infoPtr
,
(
HRGN
)
wParam
,
lParam
);
return
0
;
goto
def
;
case
WM_NOTIFY
:
case
WM_NOTIFY
:
return
TREEVIEW_Notify
(
infoPtr
,
wParam
,
lParam
);
return
TREEVIEW_Notify
(
infoPtr
,
wParam
,
lParam
);
...
@@ -5764,7 +5765,7 @@ TREEVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -5764,7 +5765,7 @@ TREEVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return
TREEVIEW_HandleTimer
(
infoPtr
,
wParam
);
return
TREEVIEW_HandleTimer
(
infoPtr
,
wParam
);
case
WM_THEMECHANGED
:
case
WM_THEMECHANGED
:
return
theme_c
hanged
(
infoPtr
);
return
TREEVIEW_ThemeC
hanged
(
infoPtr
);
case
WM_VSCROLL
:
case
WM_VSCROLL
:
return
TREEVIEW_VScroll
(
infoPtr
,
wParam
);
return
TREEVIEW_VScroll
(
infoPtr
,
wParam
);
...
@@ -5772,9 +5773,7 @@ TREEVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -5772,9 +5773,7 @@ TREEVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
/* WM_WININICHANGE */
/* WM_WININICHANGE */
case
WM_MOUSEWHEEL
:
case
WM_MOUSEWHEEL
:
if
(
wParam
&
(
MK_SHIFT
|
MK_CONTROL
))
return
TREEVIEW_MouseWheel
(
infoPtr
,
wParam
,
lParam
);
goto
def
;
return
TREEVIEW_MouseWheel
(
infoPtr
,
wParam
);
case
WM_DRAWITEM
:
case
WM_DRAWITEM
:
TRACE
(
"drawItem
\n
"
);
TRACE
(
"drawItem
\n
"
);
...
...
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