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.

202 lines
3.3 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1995 - 1995.
  5. //
  6. // File: shrpage.hxx
  7. //
  8. // Contents: "Sharing" shell property page extension
  9. //
  10. // History: 6-Apr-95 BruceFo Created
  11. //
  12. //--------------------------------------------------------------------------
  13. #ifndef __SHRPAGE_HXX__
  14. #define __SHRPAGE_HXX__
  15. class CShareInfo;
  16. class CSharingPropertyPage
  17. {
  18. DECLARE_SIG;
  19. public:
  20. //
  21. // Main page dialog procedure: static
  22. //
  23. static
  24. INT_PTR CALLBACK
  25. DlgProcPage(
  26. HWND hWnd,
  27. UINT msg,
  28. WPARAM wParam,
  29. LPARAM lParam
  30. );
  31. static
  32. LRESULT CALLBACK
  33. SizeWndProc(
  34. IN HWND hwnd,
  35. IN UINT wMsg,
  36. IN WPARAM wParam,
  37. IN LPARAM lParam
  38. );
  39. //
  40. // constructor, destructor, 2nd phase constructor
  41. //
  42. CSharingPropertyPage(
  43. IN HWND hwndPage,
  44. IN PWSTR pszMachine,
  45. IN PWSTR pszShare
  46. );
  47. ~CSharingPropertyPage();
  48. HRESULT
  49. InitInstance(
  50. VOID
  51. );
  52. private:
  53. //
  54. // Main page dialog procedure: non-static
  55. //
  56. INT_PTR
  57. _PageProc(
  58. IN HWND hWnd,
  59. IN UINT msg,
  60. IN WPARAM wParam,
  61. IN LPARAM lParam
  62. );
  63. //
  64. // Window messages and notifications
  65. //
  66. BOOL
  67. _OnInitDialog(
  68. IN HWND hwnd,
  69. IN HWND hwndFocus,
  70. IN LPARAM lInitParam
  71. );
  72. BOOL
  73. _OnCommand(
  74. IN HWND hwnd,
  75. IN WORD wNotifyCode,
  76. IN WORD wID,
  77. IN HWND hwndCtl
  78. );
  79. BOOL
  80. _OnPermissions(
  81. IN HWND hwnd
  82. );
  83. BOOL
  84. _OnNotify(
  85. IN HWND hwnd,
  86. IN int idCtrl,
  87. IN LPNMHDR phdr
  88. );
  89. BOOL
  90. _OnPropertySheetNotify(
  91. IN HWND hwnd,
  92. IN LPNMHDR phdr
  93. );
  94. BOOL
  95. _OnNcDestroy(
  96. IN HWND hwnd
  97. );
  98. //
  99. // Other helper methods
  100. //
  101. VOID
  102. _InitializeControls(
  103. IN HWND hwnd
  104. );
  105. VOID
  106. _SetControlsToDefaults(
  107. IN HWND hwnd
  108. );
  109. VOID
  110. _CacheMaxUses(
  111. IN HWND hwnd
  112. );
  113. VOID
  114. _SetControlsFromData(
  115. IN HWND hwnd
  116. );
  117. BOOL
  118. _ValidatePage(
  119. IN HWND hwnd
  120. );
  121. BOOL
  122. _DoApply(
  123. IN HWND hwnd
  124. );
  125. BOOL
  126. _DoCancel(
  127. IN HWND hwnd
  128. );
  129. VOID
  130. _MarkItemDirty(
  131. VOID
  132. );
  133. HWND
  134. _GetFrameWindow(
  135. VOID
  136. )
  137. {
  138. return GetParent(_hwndPage);
  139. }
  140. #if DBG == 1
  141. VOID
  142. Dump(
  143. IN PWSTR pszCaption
  144. );
  145. #endif // DBG == 1
  146. //
  147. // Private class variables
  148. //
  149. PWSTR _pszMachine;
  150. PWSTR _pszShare;
  151. HWND _hwndPage; // HWND to the property page
  152. BOOL _fInitializingPage;
  153. BOOL _bDirty; // Dirty flag: anything changed?
  154. BOOL _bShareNameChanged;
  155. BOOL _bPathChanged;
  156. BOOL _bCommentChanged;
  157. BOOL _bUserLimitChanged;
  158. BOOL _bSecDescChanged;
  159. CShareInfo* _pCurInfo;
  160. PWSTR _pszReplacePath;
  161. WORD _wMaxUsers;
  162. WNDPROC _pfnAllowProc;
  163. };
  164. #endif // __SHRPAGE_HXX__