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
ea058d22
Commit
ea058d22
authored
Nov 27, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Add NM_HOVER notification.
parent
5f191553
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
4 deletions
+41
-4
listview.c
dlls/comctl32/listview.c
+6
-3
listview.c
dlls/comctl32/tests/listview.c
+35
-1
No files found.
dlls/comctl32/listview.c
View file @
ea058d22
...
...
@@ -99,7 +99,6 @@
* -- LVN_GETINFOTIP
* -- LVN_HOTTRACK
* -- LVN_SETDISPINFO
* -- NM_HOVER
* -- LVN_BEGINRDRAG
*
* Messages:
...
...
@@ -3654,18 +3653,22 @@ static inline BOOL LISTVIEW_IsHotTracking(const LISTVIEW_INFO *infoPtr)
*/
static
LRESULT
LISTVIEW_MouseHover
(
LISTVIEW_INFO
*
infoPtr
,
WORD
fwKeys
,
INT
x
,
INT
y
)
{
NMHDR
hdr
;
if
(
notify_hdr
(
infoPtr
,
NM_HOVER
,
&
hdr
))
return
0
;
if
(
LISTVIEW_IsHotTracking
(
infoPtr
))
{
LVITEMW
item
;
POINT
pt
;
SetFocus
(
infoPtr
->
hwndSelf
);
pt
.
x
=
x
;
pt
.
y
=
y
;
if
(
LISTVIEW_GetItemAtPt
(
infoPtr
,
&
item
,
pt
))
LISTVIEW_SetSelection
(
infoPtr
,
item
.
iItem
);
SetFocus
(
infoPtr
->
hwndSelf
);
}
return
0
;
...
...
dlls/comctl32/tests/listview.c
View file @
ea058d22
...
...
@@ -46,7 +46,9 @@ static const WCHAR testparentclassW[] =
HWND
hwndparent
,
hwndparentW
;
/* prevents edit box creation, LVN_BEGINLABELEDIT return value */
BOOL
blockEdit
;
static
BOOL
blockEdit
;
/* return nonzero on NM_HOVER */
static
BOOL
g_block_hover
;
/* dumps LVN_ITEMCHANGED message data */
static
BOOL
g_dump_itemchanged
;
/* format reported to control:
...
...
@@ -278,6 +280,12 @@ static const struct message edit_end_nochange[] = {
{
0
}
};
static
const
struct
message
hover_parent
[]
=
{
{
WM_GETDLGCODE
,
sent
},
/* todo_wine */
{
WM_NOTIFY
,
sent
|
id
,
0
,
0
,
NM_HOVER
},
{
0
}
};
static
LRESULT
WINAPI
parent_wnd_proc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
static
LONG
defwndproc_counter
=
0
;
...
...
@@ -344,6 +352,9 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP
nmlv
->
iItem
,
nmlv
->
uNewState
,
nmlv
->
uOldState
,
nmlv
->
uChanged
);
}
break
;
case
NM_HOVER
:
if
(
g_block_hover
)
return
1
;
break
;
}
break
;
}
...
...
@@ -4247,6 +4258,28 @@ static void test_LVS_EX_HEADERINALLVIEWS(void)
DestroyWindow
(
hwnd
);
}
static
void
test_hover
(
void
)
{
HWND
hwnd
;
DWORD
r
;
hwnd
=
create_custom_listview_control
(
LVS_ICON
);
/* test WM_MOUSEHOVER forwarding */
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
r
=
SendMessage
(
hwnd
,
WM_MOUSEHOVER
,
0
,
0
);
expect
(
0
,
r
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
hover_parent
,
"NM_HOVER allow test"
,
TRUE
);
g_block_hover
=
TRUE
;
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
r
=
SendMessage
(
hwnd
,
WM_MOUSEHOVER
,
0
,
0
);
expect
(
0
,
r
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
hover_parent
,
"NM_HOVER block test"
,
TRUE
);
g_block_hover
=
FALSE
;
DestroyWindow
(
hwnd
);
}
START_TEST
(
listview
)
{
HMODULE
hComctl32
;
...
...
@@ -4306,6 +4339,7 @@ START_TEST(listview)
test_getcolumnwidth
();
test_approximate_viewrect
();
test_finditem
();
test_hover
();
if
(
!
load_v6_module
(
&
ctx_cookie
,
&
hCtx
))
{
...
...
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