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
f0d6d95e
Commit
f0d6d95e
authored
Aug 16, 2010
by
David Hedberg
Committed by
Alexandre Julliard
Aug 17, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorerframe: Handle changing the selection.
parent
4ad1050e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
1 deletion
+36
-1
nstc.c
dlls/explorerframe/nstc.c
+28
-0
nstc.c
dlls/explorerframe/tests/nstc.c
+8
-1
No files found.
dlls/explorerframe/nstc.c
View file @
f0d6d95e
...
...
@@ -138,6 +138,13 @@ static HRESULT events_OnAfterExpand(NSTC2Impl *This, IShellItem *psi)
return
ret
;
}
static
HRESULT
events_OnSelectionChanged
(
NSTC2Impl
*
This
,
IShellItemArray
*
psia
)
{
if
(
!
This
->
pnstce
)
return
S_OK
;
return
INameSpaceTreeControlEvents_OnSelectionChanged
(
This
->
pnstce
,
psia
);
}
/*************************************************************************
* NamespaceTree helper functions
*/
...
...
@@ -508,6 +515,26 @@ static LRESULT on_tvn_itemexpandedw(NSTC2Impl *This, LPARAM lParam)
return
TRUE
;
}
static
LRESULT
on_tvn_selchangedw
(
NSTC2Impl
*
This
,
LPARAM
lParam
)
{
NMTREEVIEWW
*
nmtv
=
(
NMTREEVIEWW
*
)
lParam
;
IShellItemArray
*
psia
;
IShellItem
*
psi
;
HRESULT
hr
;
TRACE
(
"%p
\n
"
,
This
);
/* Note: Only supports one selected item. */
psi
=
shellitem_from_treeitem
(
This
,
nmtv
->
itemNew
.
hItem
);
hr
=
SHCreateShellItemArrayFromShellItem
(
psi
,
&
IID_IShellItemArray
,
(
void
**
)
&
psia
);
if
(
SUCCEEDED
(
hr
))
{
events_OnSelectionChanged
(
This
,
psia
);
IShellItemArray_Release
(
psia
);
}
return
TRUE
;
}
static
LRESULT
CALLBACK
NSTC2_WndProc
(
HWND
hWnd
,
UINT
uMessage
,
WPARAM
wParam
,
LPARAM
lParam
)
{
...
...
@@ -527,6 +554,7 @@ static LRESULT CALLBACK NSTC2_WndProc(HWND hWnd, UINT uMessage,
case
TVN_GETDISPINFOW
:
return
on_tvn_getdispinfow
(
This
,
lParam
);
case
TVN_ITEMEXPANDINGW
:
return
on_tvn_itemexpandingw
(
This
,
lParam
);
case
TVN_ITEMEXPANDEDW
:
return
on_tvn_itemexpandedw
(
This
,
lParam
);
case
TVN_SELCHANGEDW
:
return
on_tvn_selchangedw
(
This
,
lParam
);
default:
break
;
}
break
;
...
...
dlls/explorerframe/tests/nstc.c
View file @
f0d6d95e
...
...
@@ -1251,7 +1251,7 @@ static void test_events(void)
ok
(
hwnd_tv
!=
NULL
,
"Failed to get hwnd_tv HWND.
\n
"
);
if
(
hwnd_tv
)
{
HTREEITEM
hroot
;
HTREEITEM
hroot
,
hitem
;
/* Test On*Expand */
hroot
=
(
HTREEITEM
)
SendMessageW
(
hwnd_tv
,
TVM_GETNEXTITEM
,
TVGN_ROOT
,
0
);
...
...
@@ -1268,6 +1268,13 @@ static void test_events(void)
SendMessage
(
hwnd_tv
,
TVM_EXPAND
,
TVE_EXPAND
,
(
LPARAM
)
hroot
);
process_msgs
();
ok_no_events
(
pnstceimpl
);
/* Test OnSelectionChanged */
hitem
=
(
HTREEITEM
)
SendMessageW
(
hwnd_tv
,
TVM_GETNEXTITEM
,
TVGN_CHILD
,
(
LPARAM
)
hroot
);
SendMessageW
(
hwnd_tv
,
TVM_SELECTITEM
,
TVGN_CARET
,
(
LPARAM
)
hitem
);
process_msgs
();
ok_event_count
(
pnstceimpl
,
OnSelectionChanged
,
1
);
ok_no_events
(
pnstceimpl
);
}
else
skip
(
"Skipping some tests.
\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