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.

99 lines
3.3 KiB

  1. //
  2. // Copyright 2001 - Microsoft Corporation
  3. //
  4. //
  5. // Created By:
  6. // Geoff Pease (GPease) 23-JAN-2001
  7. //
  8. // Maintained By:
  9. // Geoff Pease (GPease) 23-JAN-2001
  10. //
  11. #pragma once
  12. class
  13. CSummaryPage
  14. : public IShellExtInit
  15. , public IShellPropSheetExt
  16. {
  17. private: // data
  18. ULONG _cRef; // reference counter
  19. HWND _hdlg; // dialog handle
  20. LPIDA _pida; //
  21. BOOL _fReadOnly:1; // TRUE if the storage is read-only
  22. BOOL _fNeedLicensePage:1; // TRUE if we need to add the license page
  23. BOOL _fAdvanced; // Show the Advanced Dialog == TRUE -- hast be be a complete BOOL!
  24. CAdvancedDlg * _pAdvancedDlg; // Advanced Dialog
  25. CSimpleDlg * _pSimpleDlg; // Simple Dialog
  26. DWORD _dwCurrentBindMode; // what mode the storage was openned with.
  27. ULONG _cSources; // number of sources - sizeof the arrays _rgpss and rgpPropertyCache
  28. DWORD * _rgdwDocType; // array of DWORDs indicating file type (see PTSFTYPE flags)
  29. IPropertySetStorage ** _rgpss; // array of IPropertySetStorages representing the PIDLs
  30. CPropertyCache * _pPropertyCache; // Property Cache
  31. private: // methods
  32. explicit CSummaryPage( void );
  33. ~CSummaryPage( void );
  34. HRESULT
  35. Init( void );
  36. HRESULT
  37. Item( UINT idxIn, LPITEMIDLIST * ppidlOut );
  38. HRESULT
  39. EnsureAdvancedDlg( void );
  40. HRESULT
  41. EnsureSimpleDlg( void );
  42. HRESULT
  43. PersistMode( void );
  44. HRESULT
  45. RecallMode( void );
  46. HRESULT
  47. RetrieveProperties( void );
  48. HRESULT
  49. PersistProperties( void );
  50. HRESULT
  51. BindToStorage( void );
  52. HRESULT
  53. ReleaseStorage( void );
  54. void
  55. CollateMultipleProperties( CPropertyCache ** rgpPropertyCaches );
  56. void
  57. ChangeGatheredPropertiesToReadOnly( CPropertyCache * pCacheIn );
  58. HRESULT
  59. CheckForCopyProtection( CPropertyCache * pCacheIn );
  60. //
  61. // Message Handlers
  62. //
  63. static INT_PTR CALLBACK
  64. DlgProc( HWND hDlgIn, UINT uMsgIn, WPARAM wParam, LPARAM lParam );
  65. static UINT CALLBACK
  66. PageCallback( HWND hwndIn, UINT uMsgIn, LPPROPSHEETPAGE ppspIn );
  67. LRESULT
  68. OnInitDialog( void );
  69. LRESULT
  70. OnNotify( int iCtlIdIn, LPNMHDR pnmhIn );
  71. LRESULT
  72. OnToggle( void );
  73. LRESULT
  74. OnDestroy( void );
  75. public: // methods
  76. static HRESULT
  77. CreateInstance( IUnknown ** ppunkOut );
  78. // IUnknown
  79. STDMETHOD( QueryInterface )( REFIID riid, LPVOID *ppv );
  80. STDMETHOD_( ULONG, AddRef )( void );
  81. STDMETHOD_( ULONG, Release )( void );
  82. // IShellExtInit
  83. STDMETHOD( Initialize )( LPCITEMIDLIST pidlFolder, LPDATAOBJECT lpdobj, HKEY hkeyProgID );
  84. // IShellPropSheetExt
  85. STDMETHOD( AddPages )( LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam);
  86. STDMETHOD( ReplacePage )( UINT uPageID, LPFNADDPROPSHEETPAGE lpfnReplacePage, LPARAM lParam );
  87. };