/************************************************************************** IContextMenu::InvokeCommand Carries out the command associated with a shortcut menu item. Parameters pici Pointer to a CMINVOKECOMMANDINFO or CMINVOKECOMMANDINFOEX structure containing information about the command. For further details, see the Remarks section. Return Value Returns NOERROR if successful, or an OLE-defined error value otherwise. **************************************************************************/ STDMETHODIMP CContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) { if(HIWORD(lpcmi->lpVerb)) { //the command is being sent via a verb return NOERROR; } if(LOWORD(lpcmi->lpVerb) > IDM_LAST) return m_pContextMenu->InvokeCommand(lpcmi); //return ResultFromScode(E_INVALIDARG); switch(LOWORD(lpcmi->lpVerb)) { case IDM_EXPLORE: case IDM_OPEN: OnOpenFolder(lpcmi); break; case IDM_RENAME: break; case IDM_EXECUTE: OnExecute(); break; case IDM_CREATE_FOLDER: OnCreateNewFolder(); break; case IDM_DELETE_FOLDER: OnDelete(); break; case IDM_PROPERTIES: OnShowProperties(); break; case IDM_ADDEXTFOLDER: OnCreateExtensionFolder(); break; case IDM_HIDEEXTENSION: OnHideExtension(); break; case IDM_SHOWONLYEXTENSION: OnShowOnlyExtension(); break; case IDM_OPENCONTAININGFOLDER1: OnOpenContainingFolder(); break; case IDM_CLEARSEARCH: OnClearSearch(); break; // default: // return m_pContextMenu->InvokeCommand(lpcmi); } return NOERROR; }
void COverallDataView::OnEditProperties() { OnShowProperties(); }