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.

110 lines
2.7 KiB

  1. #ifndef SHVIEW_H
  2. #define SHVIEW_H
  3. #define NS_CLASS_NAME (TEXT("PStoreNSClass"))
  4. //
  5. // menu items
  6. //
  7. #define IDM_MESSAGE1 (FCIDM_SHVIEWFIRST + 0x500)
  8. #define IDM_MESSAGE2 (FCIDM_SHVIEWFIRST + 0x501)
  9. #define IDM_VIEW_ISTB (FCIDM_SHVIEWFIRST + 0x502)
  10. #define IDM_VIEW_IETB (FCIDM_SHVIEWFIRST + 0x503)
  11. //
  12. // control IDs
  13. //
  14. #define ID_LISTVIEW 2000
  15. class CShellView : public IShellView, public IOleCommandTarget
  16. {
  17. protected:
  18. LONG m_ObjRefCount;
  19. public:
  20. CShellView(CShellFolder*, LPCITEMIDLIST);
  21. ~CShellView();
  22. //
  23. // IUnknown methods
  24. //
  25. STDMETHOD (QueryInterface)(REFIID, LPVOID FAR *);
  26. STDMETHOD_ (DWORD, AddRef)();
  27. STDMETHOD_ (DWORD, Release)();
  28. //
  29. // IOleWindow methods
  30. //
  31. STDMETHOD (GetWindow) (HWND*);
  32. STDMETHOD (ContextSensitiveHelp) (BOOL);
  33. //
  34. // IShellView methods
  35. //
  36. STDMETHOD (TranslateAccelerator) (LPMSG);
  37. STDMETHOD (EnableModeless) (BOOL);
  38. STDMETHOD (UIActivate) (UINT);
  39. STDMETHOD (Refresh) (void);
  40. STDMETHOD (CreateViewWindow) (LPSHELLVIEW, LPCFOLDERSETTINGS, LPSHELLBROWSER, LPRECT, HWND*);
  41. STDMETHOD (DestroyViewWindow) (void);
  42. STDMETHOD (GetCurrentInfo) (LPFOLDERSETTINGS);
  43. STDMETHOD (AddPropertySheetPages) (DWORD, LPFNADDPROPSHEETPAGE, LPARAM);
  44. STDMETHOD (SaveViewState) (void);
  45. STDMETHOD (SelectItem) (LPCITEMIDLIST, UINT);
  46. STDMETHOD (GetItemObject) (UINT, REFIID, LPVOID*);
  47. //
  48. // IOleCommandTarget methods
  49. //
  50. STDMETHOD (QueryStatus) (const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText);
  51. STDMETHOD (Exec) (const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdExecOpt, VARIANTARG *pvaIn, VARIANTARG *pvaOut);
  52. private:
  53. //
  54. // private member variables
  55. //
  56. UINT m_uState;
  57. BOOL m_bShowIETB;
  58. BOOL m_bShowISTB;
  59. LPITEMIDLIST m_pidl;
  60. OLEMENUGROUPWIDTHS m_MenuWidths;
  61. FOLDERSETTINGS m_FolderSettings;
  62. LPSHELLBROWSER m_pShellBrowser;
  63. HWND m_hwndParent;
  64. HWND m_hWnd;
  65. HWND m_hwndList;
  66. HMENU m_hMenu;
  67. int m_nColumn1;
  68. int m_nColumn2;
  69. CShellFolder *m_pSFParent;
  70. //
  71. // private member functions
  72. //
  73. static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam);
  74. void UpdateToolbar();
  75. LRESULT UpdateMenu(HMENU hMenu);
  76. HRESULT GetSettings(void);
  77. HRESULT SaveSettings(void);
  78. HMENU BuildMenu(void);
  79. LRESULT OnCommand(DWORD, DWORD, HWND);
  80. LRESULT OnActivate(WPARAM wParam, LPARAM lParam);
  81. LRESULT OnSetFocus(void);
  82. LRESULT OnNotify(UINT, LPNMHDR);
  83. LRESULT OnSize(WORD, WORD);
  84. LRESULT OnCreate(void);
  85. BOOL CreateList(void);
  86. BOOL InitList(void);
  87. BOOL FillList(void);
  88. };
  89. #endif // SHVIEW_H