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
8499ace1
Commit
8499ace1
authored
Jun 09, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Use IS_INTRESOURCE() to test context menu verb kind.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8ea9c338
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
14 deletions
+17
-14
shlmenu.c
dlls/shell32/shlmenu.c
+14
-11
shlview_cmenu.c
dlls/shell32/shlview_cmenu.c
+3
-3
No files found.
dlls/shell32/shlmenu.c
View file @
8499ace1
...
...
@@ -1114,25 +1114,28 @@ static HRESULT WINAPI CompositeCMenu_GetCommandString(IContextMenu3* iface, UINT
static
HRESULT
WINAPI
CompositeCMenu_InvokeCommand
(
IContextMenu3
*
iface
,
LPCMINVOKECOMMANDINFO
pici
)
{
CompositeCMenu
*
This
=
impl_from_IContextMenu3
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
pici
);
if
(
HIWORD
(
pici
->
lpVerb
))
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
pici
);
if
(
IS_INTRESOURCE
(
pici
->
lpVerb
))
{
UINT
id
=
(
UINT_PTR
)
pici
->
lpVerb
;
UINT
index
=
CompositeCMenu_GetIndexForCommandId
(
This
,
id
);
return
IContextMenu_InvokeCommand
(
This
->
menus
[
index
],
pici
);
}
else
{
/*call each handler until one of them succeeds*/
UINT
i
=
0
;
for
(;
i
<
This
->
menu_count
;
i
++
)
UINT
i
;
for
(
i
=
0
;
i
<
This
->
menu_count
;
i
++
)
{
HRESULT
hres
;
if
(
SUCCEEDED
(
hres
=
IContextMenu_InvokeCommand
(
This
->
menus
[
i
],
pici
)))
if
(
SUCCEEDED
(
hres
=
IContextMenu_InvokeCommand
(
This
->
menus
[
i
],
pici
)))
return
hres
;
}
return
E_FAIL
;
}
else
{
UINT
id
=
(
UINT_PTR
)
pici
->
lpVerb
;
UINT
index
=
CompositeCMenu_GetIndexForCommandId
(
This
,
id
);
return
IContextMenu_InvokeCommand
(
This
->
menus
[
index
],
pici
);
}
}
static
HRESULT
WINAPI
CompositeCMenu_QueryContextMenu
(
IContextMenu3
*
iface
,
HMENU
hmenu
,
UINT
indexMenu
,
UINT
idCmdFirst
,
UINT
idCmdLast
,
UINT
uFlags
)
...
...
dlls/shell32/shlview_cmenu.c
View file @
8499ace1
...
...
@@ -397,13 +397,13 @@ static HRESULT WINAPI ItemMenu_InvokeCommand(
TRACE
(
"(%p)->(invcom=%p verb=%p wnd=%p)
\n
"
,
This
,
lpcmi
,
lpcmi
->
lpVerb
,
lpcmi
->
hwnd
);
if
(
HIWORD
(
lpcmi
->
lpVerb
)
==
0
&&
LOWORD
(
lpcmi
->
lpVerb
)
>
FCIDM_SHVIEWLAST
)
if
(
IS_INTRESOURCE
(
lpcmi
->
lpVerb
)
&&
LOWORD
(
lpcmi
->
lpVerb
)
>
FCIDM_SHVIEWLAST
)
{
TRACE
(
"Invalid Verb %x
\n
"
,
LOWORD
(
lpcmi
->
lpVerb
));
TRACE
(
"Invalid Verb %x
\n
"
,
LOWORD
(
lpcmi
->
lpVerb
));
return
E_INVALIDARG
;
}
if
(
HIWORD
(
lpcmi
->
lpVerb
)
==
0
)
if
(
IS_INTRESOURCE
(
lpcmi
->
lpVerb
)
)
{
switch
(
LOWORD
(
lpcmi
->
lpVerb
))
{
...
...
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