/**************************************************************************
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
Copyright 1997 Microsoft Corporation. All Rights Reserved.
**************************************************************************/
/******************************************************************************
File: ContMenu.h
Description: CContextMenu definitions.
******************************************************************************/
#ifndef CONTMENU_H
#define CONTMENU_H
#include <windows.h>
#include <shlobj.h>
#include "ShlFldr.h"
#include "PidlMgr.h"
/**************************************************************************
CContextMenu class definition
**************************************************************************/
class CContextMenu : public IContextMenu
{
protected:
DWORD m_ObjRefCount;
LPITEMIDLIST *m_aPidls;
IMalloc *m_pMalloc;
CPidlMgr *m_pPidlMgr;
CShellFolder *m_pSFParent;
BOOL m_fAllValues;
public:
CContextMenu(CShellFolder*, LPCITEMIDLIST*, UINT);
~CContextMenu();
//IUnknown methods
STDMETHODIMP QueryInterface(REFIID, LPVOID FAR *);
STDMETHODIMP_(DWORD) AddRef();
STDMETHODIMP_(DWORD) Release();
//IContextMenu methods
STDMETHODIMP QueryContextMenu(HMENU, UINT, UINT, UINT, UINT);
STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO);
STDMETHODIMP GetCommandString(UINT, UINT, LPUINT, LPSTR, UINT);
private:
BOOL AllocPidlTable(DWORD);
void FreePidlTable(void);
BOOL FillPidlTable(LPCITEMIDLIST*, UINT);
};
#define IDM_EXPLORE 0
#define IDM_OPEN 1
#define IDM_LAST IDM_OPEN
#endif// CONTMENU_H