Leaked source code of windows server 2003
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.

79 lines
2.4 KiB

  1. /**************************************************************************
  2. THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  3. ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  4. THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  5. PARTICULAR PURPOSE.
  6. Copyright 1998 Microsoft Corporation. All Rights Reserved.
  7. **************************************************************************/
  8. /******************************************************************************
  9. File: ContMenu.h
  10. Description: CContextMenu definitions.
  11. ******************************************************************************/
  12. #ifndef CONTMENU_H
  13. #define CONTMENU_H
  14. #include <windows.h>
  15. #include <windowsx.h>
  16. #include <shlobj.h>
  17. #include "ShlFldr.h"
  18. #include "PidlMgr.h"
  19. #include "resource.h"
  20. /**************************************************************************
  21. CContextMenu class definition
  22. **************************************************************************/
  23. class CContextMenu : public IContextMenu
  24. {
  25. private:
  26. DWORD m_ObjRefCount;
  27. LPITEMIDLIST *m_aPidls;
  28. IMalloc *m_pMalloc;
  29. CPidlMgr *m_pPidlMgr;
  30. CShellFolder *m_psfParent;
  31. UINT m_uItemCount;
  32. BOOL m_fBackground;
  33. UINT m_cfPrivateData;
  34. public:
  35. CContextMenu(CShellFolder *psfParent, LPCITEMIDLIST *aPidls = NULL, UINT uItemCount = 0);
  36. ~CContextMenu();
  37. //IUnknown methods
  38. STDMETHODIMP QueryInterface(REFIID, LPVOID FAR *);
  39. STDMETHODIMP_(DWORD) AddRef();
  40. STDMETHODIMP_(DWORD) Release();
  41. //IContextMenu methods
  42. STDMETHODIMP QueryContextMenu(HMENU, UINT, UINT, UINT, UINT);
  43. STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO);
  44. STDMETHODIMP GetCommandString(UINT, UINT, LPUINT, LPSTR, UINT);
  45. private:
  46. LPITEMIDLIST* AllocPidlTable(DWORD);
  47. VOID FreePidlTable(LPITEMIDLIST*);
  48. BOOL FillPidlTable(LPCITEMIDLIST*, UINT);
  49. BOOL DoCopyOrCut(HWND, BOOL);
  50. BOOL DoPaste(VOID);
  51. BOOL DoExplore(HWND);
  52. BOOL DoOpen(HWND);
  53. STDMETHODIMP DoDelete(VOID);
  54. STDMETHODIMP DoNewFolder(HWND);
  55. STDMETHODIMP DoNewItem(HWND);
  56. VOID DoRename(HWND);
  57. int DoModifyData(HWND);
  58. UINT InsertBackgroundItems(HMENU, UINT, UINT);
  59. UINT InsertItems(HMENU, UINT, UINT, UINT);
  60. };
  61. #define MYCMF_MULTISELECT 0x00010000
  62. #endif// CONTMENU_H