|
// MenuItem.h : Declaration of the CMenuItem
#ifndef __MENUITEM_H_
#define __MENUITEM_H_
#include "resource.h" // main symbols
#include <shlobj.h>
#include <comdef.h>
#include <string>
/////////////////////////////////////////////////////////////////////////////
// CMenuItem
class ATL_NO_VTABLE CMenuItem :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CMenuItem, &CLSID_MenuItem>,
// public IMenuItem
public IShellExtInit,
public IContextMenu
{
public:
CMenuItem() { }
protected:
std::basic_string<TCHAR> file;
public:
// IShellExtInit
STDMETHODIMP Initialize(LPCITEMIDLIST, LPDATAOBJECT, HKEY);
public:
// IContextMenu
STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO);
STDMETHODIMP GetCommandString(UINT, UINT, UINT*, LPSTR, UINT);
STDMETHODIMP QueryContextMenu(HMENU, UINT, UINT, UINT, UINT);
DECLARE_REGISTRY_RESOURCEID(IDR_MENUITEM)
DECLARE_NOT_AGGREGATABLE(CMenuItem)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(CMenuItem)
// COM_INTERFACE_ENTRY(IMenuItem)
COM_INTERFACE_ENTRY(IShellExtInit)
COM_INTERFACE_ENTRY(IContextMenu)
END_COM_MAP()
// IMenuItem
public:
};
#endif //__MENUITEM_H_
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.