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.

150 lines
3.9 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. // load initial state into CFileMgmtGeneral
  34. virtual BOOL Load( CFileMgmtComponentData* pFileMgmtData, LPDATAOBJECT piDataObject );
  35. CString m_strMachineName;
  36. CString m_strShareName;
  37. CFileMgmtComponentData* m_pFileMgmtData;
  38. FILEMGMT_TRANSPORT m_transport;
  39. LONG_PTR m_handle; // notification handle for changes, can only be freed once by MMCFreeNotifyHandle
  40. LPDATAOBJECT m_pDataObject; // use as hint for change notification
  41. // Dialog Data
  42. //{{AFX_DATA(CSharePage)
  43. //}}AFX_DATA
  44. // Overrides
  45. // ClassWizard generate virtual function overrides
  46. //{{AFX_VIRTUAL(CSharePage)
  47. public:
  48. virtual BOOL OnApply();
  49. protected:
  50. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  51. //}}AFX_VIRTUAL
  52. // Implementation
  53. protected:
  54. // Generated message map functions
  55. //{{AFX_MSG(CSharePage)
  56. // virtual BOOL OnInitDialog();
  57. //}}AFX_MSG
  58. DECLARE_MESSAGE_MAP()
  59. public:
  60. BOOL IsModified () const;
  61. void SetModified (BOOL bChanged);
  62. // User defined functions
  63. // This mechanism deletes the page when the property sheet is finished
  64. static UINT CALLBACK PropSheetPageProc(
  65. HWND hwnd,
  66. UINT uMsg,
  67. LPPROPSHEETPAGE ppsp );
  68. private:
  69. BOOL m_bChanged;
  70. };
  71. /////////////////////////////////////////////////////////////////////////////
  72. // CSharePageGeneral dialog
  73. class CSharePageGeneral : public CSharePage
  74. {
  75. DECLARE_DYNCREATE(CSharePageGeneral)
  76. // Construction
  77. public:
  78. CSharePageGeneral(UINT nIDTemplate = 0);
  79. virtual ~CSharePageGeneral();
  80. // load initial state into CFileMgmtGeneral
  81. virtual BOOL Load( CFileMgmtComponentData* pFileMgmtData, LPDATAOBJECT piDataObject );
  82. PVOID m_pvPropertyBlock;
  83. BOOL m_fEnableDescription;
  84. BOOL m_fEnablePath;
  85. DWORD m_dwShareType;
  86. // Dialog Data
  87. //{{AFX_DATA(CSharePageGeneral)
  88. enum { IDD = IDD_SHAREPROP_GENERAL };
  89. CSpinButtonCtrl m_spinMaxUsers;
  90. CButton m_checkboxAllowSpecific;
  91. CButton m_checkBoxMaxAllowed;
  92. CEdit m_editShareName;
  93. CEdit m_editPath;
  94. CEdit m_editDescription;
  95. CString m_strPath;
  96. CString m_strDescription;
  97. int m_iMaxUsersAllowed;
  98. DWORD m_dwMaxUsers;
  99. //}}AFX_DATA
  100. // Overrides
  101. // ClassWizard generate virtual function overrides
  102. //{{AFX_VIRTUAL(CSharePageGeneral)
  103. public:
  104. virtual BOOL OnApply();
  105. protected:
  106. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  107. //}}AFX_VIRTUAL
  108. // Implementation
  109. protected:
  110. // Generated message map functions
  111. //{{AFX_MSG(CSharePageGeneral)
  112. afx_msg BOOL OnHelp(WPARAM wParam, LPARAM lParam);
  113. afx_msg BOOL OnContextHelp(WPARAM wParam, LPARAM lParam);
  114. afx_msg void OnChangeEditPathName();
  115. afx_msg void OnChangeEditDescription();
  116. afx_msg void OnChangeEditShareName();
  117. afx_msg void OnShrpropAllowSpecific();
  118. afx_msg void OnShrpropMaxAllowed();
  119. afx_msg void OnChangeShrpropEditUsers();
  120. //}}AFX_MSG
  121. DECLARE_MESSAGE_MAP()
  122. };
  123. #endif // _SHRPROP_H_