mirror of
https://github.com/reactos/wine.git
synced 2024-11-27 21:50:37 +00:00
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>
This commit is contained in:
parent
8ea9c33829
commit
8499ace1ff
@ -1114,24 +1114,27 @@ 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))
|
||||
{
|
||||
/*call each handler until one of them succeeds*/
|
||||
UINT i=0;
|
||||
for(;i<This->menu_count;i++)
|
||||
{
|
||||
HRESULT hres;
|
||||
if(SUCCEEDED(hres=IContextMenu_InvokeCommand(This->menus[i],pici)))
|
||||
return hres;
|
||||
}
|
||||
return E_FAIL;
|
||||
UINT id = (UINT_PTR)pici->lpVerb;
|
||||
UINT index = CompositeCMenu_GetIndexForCommandId(This, id);
|
||||
return IContextMenu_InvokeCommand(This->menus[index], pici);
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT id = (UINT_PTR)pici->lpVerb;
|
||||
UINT index = CompositeCMenu_GetIndexForCommandId(This,id);
|
||||
return IContextMenu_InvokeCommand(This->menus[index],pici);
|
||||
/*call each handler until one of them succeeds*/
|
||||
UINT i;
|
||||
|
||||
for (i = 0; i < This->menu_count; i++)
|
||||
{
|
||||
HRESULT hres;
|
||||
if (SUCCEEDED(hres = IContextMenu_InvokeCommand(This->menus[i], pici)))
|
||||
return hres;
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user