Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.0 KiB

  1. /*****************************************************************************\
  2. FILE: ImageMenu.h
  3. DESCRIPTION:
  4. This code will display a submenu on the context menus for imagines.
  5. This will allow the conversion and manipulation of images.
  6. BryanSt 8/9/2000 Updated and Converted to C++
  7. Copyright (C) Microsoft Corp 2000-2000. All rights reserved.
  8. \*****************************************************************************/
  9. #ifndef _IMAGEMENU_H
  10. #define _IMAGEMENU_H
  11. #include <shpriv.h>
  12. HRESULT CImageMenu_CreateInstance(IN IUnknown * punkOuter, IN REFIID riid, OUT void **ppvObject);
  13. class CImageMenu : public IShellExtInit
  14. , public IContextMenu
  15. {
  16. public:
  17. //////////////////////////////////////////////////////
  18. // Public Interfaces
  19. //////////////////////////////////////////////////////
  20. // *** IUnknown ***
  21. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  22. virtual STDMETHODIMP_(ULONG) AddRef(void);
  23. virtual STDMETHODIMP_(ULONG) Release(void);
  24. // *** IShellExtInit ***
  25. virtual STDMETHODIMP Initialize(IN LPCITEMIDLIST pidlFolder, IN IDataObject *pdtobj, IN HKEY hkeyProgID);
  26. // *** IContextMenu ***
  27. virtual STDMETHODIMP QueryContextMenu(IN HMENU hmenu, IN UINT indexMenu, IN UINT idCmdFirst, IN UINT idCmdLast, IN UINT uFlags);
  28. virtual STDMETHODIMP InvokeCommand(IN LPCMINVOKECOMMANDINFO pici);
  29. virtual STDMETHODIMP GetCommandString(IN UINT_PTR idCmd, IN UINT uType, IN UINT * pwReserved, IN LPSTR pszName, IN UINT cchMax);
  30. private:
  31. CImageMenu(void);
  32. virtual ~CImageMenu(void);
  33. // Private Member Variables
  34. int m_cRef;
  35. LPTSTR m_pszFileList;
  36. UINT m_nFileCount;
  37. // Private Member Functions
  38. HRESULT _ConvertImage(IN HWND hwnd, IN UINT idc);
  39. friend HRESULT CImageMenu_CreateInstance(IN IUnknown * punkOuter, IN REFIID riid, OUT void **ppvObject);
  40. };
  41. #endif // _IMAGEMENU_H