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.

130 lines
4.0 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: ShlView.h
  10. Description: CShellView definitions.
  11. **************************************************************************/
  12. #ifndef SHELLVIEW_H
  13. #define SHELLVIEW_H
  14. #include <windows.h>
  15. #include <windowsx.h>
  16. #include <objbase.h>
  17. #include <shlobj.h>
  18. #include <ServProv.h>
  19. #include <DocObj.h>
  20. #include "ShlFldr.h"
  21. #include "PidlMgr.h"
  22. #include "ContMenu.h"
  23. /**************************************************************************
  24. global IDs
  25. **************************************************************************/
  26. //control IDs
  27. #define ID_LISTVIEW 2000
  28. /**************************************************************************
  29. CShellView class definition
  30. **************************************************************************/
  31. class CShellView : public IShellView
  32. {
  33. friend class CShellFolder;
  34. friend class CContextMenu;
  35. private:
  36. DWORD m_ObjRefCount;
  37. UINT m_uState;
  38. LPITEMIDLIST m_pidl;
  39. FOLDERSETTINGS m_FolderSettings;
  40. LPSHELLBROWSER m_pShellBrowser;
  41. HWND m_hwndParent;
  42. HWND m_hWnd;
  43. HWND m_hwndList;
  44. HMENU m_hMenu;
  45. CShellFolder *m_psfParent;
  46. LPMALLOC m_pMalloc;
  47. CPidlMgr *m_pPidlMgr;
  48. HACCEL m_hAccels;
  49. BOOL m_fInEdit;
  50. public:
  51. CShellView(CShellFolder*, LPCITEMIDLIST);
  52. ~CShellView();
  53. //IUnknown methods
  54. STDMETHOD (QueryInterface)(REFIID, LPVOID*);
  55. STDMETHOD_ (DWORD, AddRef)();
  56. STDMETHOD_ (DWORD, Release)();
  57. //IOleWindow methods
  58. STDMETHOD (GetWindow) (HWND*);
  59. STDMETHOD (ContextSensitiveHelp) (BOOL);
  60. //IShellView methods
  61. STDMETHOD (TranslateAccelerator) (LPMSG);
  62. STDMETHOD (EnableModeless) (BOOL);
  63. STDMETHOD (UIActivate) (UINT);
  64. STDMETHOD (Refresh) (VOID);
  65. STDMETHOD (CreateViewWindow) (LPSHELLVIEW, LPCFOLDERSETTINGS, LPSHELLBROWSER, LPRECT, HWND*);
  66. STDMETHOD (DestroyViewWindow) (VOID);
  67. STDMETHOD (GetCurrentInfo) (LPFOLDERSETTINGS);
  68. STDMETHOD (AddPropertySheetPages) (DWORD, LPFNADDPROPSHEETPAGE, LPARAM);
  69. STDMETHOD (SaveViewState) (VOID);
  70. STDMETHOD (SelectItem) (LPCITEMIDLIST, UINT);
  71. STDMETHOD (GetItemObject) (UINT, REFIID, LPVOID*);
  72. private:
  73. static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam);
  74. LRESULT UpdateMenu(HMENU hMenu);
  75. LRESULT UpdateToolbar(VOID);
  76. VOID MergeFileMenu(HMENU, BOOL);
  77. VOID MergeViewMenu(HMENU);
  78. VOID MergeEditMenu(HMENU, BOOL);
  79. VOID MergeToolbar(VOID);
  80. LRESULT OnCommand(DWORD, DWORD, HWND);
  81. LRESULT OnActivate(UINT);
  82. VOID OnDeactivate(VOID);
  83. LRESULT OnSetFocus(VOID);
  84. LRESULT OnKillFocus(VOID);
  85. LRESULT OnNotify(UINT, LPNMHDR);
  86. LRESULT OnSize(WORD, WORD);
  87. LRESULT OnCreate(VOID);
  88. LRESULT OnDestroy(VOID);
  89. BOOL CreateList(VOID);
  90. BOOL InitList(VOID);
  91. VOID FillList(VOID);
  92. LRESULT OnSettingChange(LPCTSTR);
  93. VOID GetShellSettings(VOID);
  94. VOID DoContextMenu(WORD, WORD, BOOL, DWORD);
  95. int FindItemPidl(LPCITEMIDLIST);
  96. LRESULT OnViewLarge(VOID);
  97. LRESULT OnViewSmall(VOID);
  98. LRESULT OnViewList(VOID);
  99. LRESULT OnViewDetails(VOID);
  100. BOOL AddItem(LPCITEMIDLIST);
  101. BOOL DeleteItem(LPCITEMIDLIST);
  102. BOOL RenameItem(LPCITEMIDLIST, LPCITEMIDLIST);
  103. LPITEMIDLIST GetPidl();
  104. LPITEMIDLIST GetFQPidl();
  105. VOID MarkItemsAsCut(LPCITEMIDLIST*, UINT);
  106. VOID EditItem(LPCITEMIDLIST);
  107. VOID UpdateData(LPCITEMIDLIST);
  108. };
  109. #endif //SHELLVIEW_H