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.

151 lines
3.8 KiB

  1. // shrprop.h : header file
  2. //
  3. #ifndef _SHRPROP_H_
  4. #define _SHRPROP_H_
  5. #include "cookie.h" // FILEMGMT_TRANSPORT
  6. #include "comptr.h" // CIP<typename>
  7. // forward delarations
  8. class CFileMgmtComponent;
  9. class CFileMgmtComponentData;
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CSharePage dialog - 4/25/2000, LinanT
  12. //
  13. // MFC-based property page inherits from this page.
  14. // CPropertyPage
  15. // |
  16. // CSharePage
  17. // / \
  18. // / \
  19. // CSharePagePublish CSharePageGeneral
  20. // / \
  21. // / \
  22. // SharePageGeneralSMB CSharePageGeneralSFM
  23. //
  24. class CSharePage : public CPropertyPage
  25. {
  26. DECLARE_DYNCREATE(CSharePage)
  27. // Construction
  28. public:
  29. CSharePage(UINT nIDTemplate = 0);
  30. virtual ~CSharePage();
  31. // User defined variables
  32. LPFNPSPCALLBACK m_pfnOriginalPropSheetPageProc;
  33. INT m_refcount;
  34. // load initial state into CFileMgmtGeneral
  35. virtual BOOL Load( CFileMgmtComponentData* pFileMgmtData, LPDATAOBJECT piDataObject );
  36. CString m_strMachineName;
  37. CString m_strShareName;
  38. CFileMgmtComponentData* m_pFileMgmtData;
  39. FILEMGMT_TRANSPORT m_transport;
  40. LONG_PTR m_handle; // notification handle for changes, can only be freed once by MMCFreeNotifyHandle
  41. LPDATAOBJECT m_pDataObject; // use as hint for change notification
  42. // Dialog Data
  43. //{{AFX_DATA(CSharePage)
  44. //}}AFX_DATA
  45. // Overrides
  46. // ClassWizard generate virtual function overrides
  47. //{{AFX_VIRTUAL(CSharePage)
  48. public:
  49. virtual BOOL OnApply();
  50. protected:
  51. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  52. //}}AFX_VIRTUAL
  53. // Implementation
  54. protected:
  55. // Generated message map functions
  56. //{{AFX_MSG(CSharePage)
  57. // virtual BOOL OnInitDialog();
  58. //}}AFX_MSG
  59. DECLARE_MESSAGE_MAP()
  60. public:
  61. BOOL IsModified () const;
  62. void SetModified (BOOL bChanged);
  63. // User defined functions
  64. // This mechanism deletes the page when the property sheet is finished
  65. static UINT CALLBACK PropSheetPageProc(
  66. HWND hwnd,
  67. UINT uMsg,
  68. LPPROPSHEETPAGE ppsp );
  69. private:
  70. BOOL m_bChanged;
  71. };
  72. /////////////////////////////////////////////////////////////////////////////
  73. // CSharePageGeneral dialog
  74. class CSharePageGeneral : public CSharePage
  75. {
  76. DECLARE_DYNCREATE(CSharePageGeneral)
  77. // Construction
  78. public:
  79. CSharePageGeneral(UINT nIDTemplate = 0);
  80. virtual ~CSharePageGeneral();
  81. // load initial state into CFileMgmtGeneral
  82. virtual BOOL Load( CFileMgmtComponentData* pFileMgmtData, LPDATAOBJECT piDataObject );
  83. PVOID m_pvPropertyBlock;
  84. BOOL m_fEnableDescription;
  85. BOOL m_fEnablePath;
  86. DWORD m_dwShareType;
  87. // Dialog Data
  88. //{{AFX_DATA(CSharePageGeneral)
  89. enum { IDD = IDD_SHAREPROP_GENERAL };
  90. CSpinButtonCtrl m_spinMaxUsers;
  91. CButton m_checkboxAllowSpecific;
  92. CButton m_checkBoxMaxAllowed;
  93. CEdit m_editShareName;
  94. CEdit m_editPath;
  95. CEdit m_editDescription;
  96. CString m_strPath;
  97. CString m_strDescription;
  98. int m_iMaxUsersAllowed;
  99. DWORD m_dwMaxUsers;
  100. //}}AFX_DATA
  101. // Overrides
  102. // ClassWizard generate virtual function overrides
  103. //{{AFX_VIRTUAL(CSharePageGeneral)
  104. public:
  105. virtual BOOL OnApply();
  106. protected:
  107. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  108. //}}AFX_VIRTUAL
  109. // Implementation
  110. protected:
  111. // Generated message map functions
  112. //{{AFX_MSG(CSharePageGeneral)
  113. afx_msg BOOL OnHelp(WPARAM wParam, LPARAM lParam);
  114. afx_msg BOOL OnContextHelp(WPARAM wParam, LPARAM lParam);
  115. afx_msg void OnChangeEditPathName();
  116. afx_msg void OnChangeEditDescription();
  117. afx_msg void OnChangeEditShareName();
  118. afx_msg void OnShrpropAllowSpecific();
  119. afx_msg void OnShrpropMaxAllowed();
  120. afx_msg void OnChangeShrpropEditUsers();
  121. //}}AFX_MSG
  122. DECLARE_MESSAGE_MAP()
  123. };
  124. #endif // _SHRPROP_H_