STDMETHODIMP test::QueryContextMenu( HMENU hMenu,
UINT indexMenu,
UINT idCmdFirst,
UINT idCmdLast,
UINT uFlags )
{
HRESULT hr = S_OK; if( CMF_DEFAULTONLY & uFlags )
hr = MAKE_HRESULT( SEVERITY_SUCCESS, 0, 0 );
else
{
.....
InsertMenu( hMenu, indexMenu, MF_SEPARATOR | MF_BYPOSITION, idCmdFirst + 0, 0 );
InsertMenu( hMenu, indexMenu, MF_STRING | MF_BYPOSITION, idCmdFirst + 1, lpcstr
); hr = MAKE_HRESULT ( SEVERITY_SUCCESS, FACILITY_NULL, MENU_ITEMS_ADDED );
} return hr;
}
这是在上方添加一个菜单,我就像只调出自己的单个菜单,该怎么实现呢?
谢谢!
UINT indexMenu,
UINT idCmdFirst,
UINT idCmdLast,
UINT uFlags )
{
HRESULT hr = S_OK; if( CMF_DEFAULTONLY & uFlags )
hr = MAKE_HRESULT( SEVERITY_SUCCESS, 0, 0 );
else
{
.....
InsertMenu( hMenu, indexMenu, MF_SEPARATOR | MF_BYPOSITION, idCmdFirst + 0, 0 );
InsertMenu( hMenu, indexMenu, MF_STRING | MF_BYPOSITION, idCmdFirst + 1, lpcstr
); hr = MAKE_HRESULT ( SEVERITY_SUCCESS, FACILITY_NULL, MENU_ITEMS_ADDED );
} return hr;
}
这是在上方添加一个菜单,我就像只调出自己的单个菜单,该怎么实现呢?
谢谢!
没有人知道吗?