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.

186 lines
4.2 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. newvol.hxx
  7. This file contains the NEW_VOLUME_DIALOG class definition
  8. FILE HISTORY:
  9. NarenG 11/19/92 Modified SHARE_DIALOG_BASE for AFPMGR.
  10. */
  11. #ifndef _NEWVOL_HXX_
  12. #define _NEWVOL_HXX_
  13. /*************************************************************************
  14. NAME: NEW_VOLUME_SRVMGR_DIALOG
  15. SYNOPSIS: The class for new volume dialog contained in the server
  16. manager. It contains the magic group
  17. for User Limit, SLE for the path, checkboxes for volume
  18. properties, the OK, Cancel, Permissions button.
  19. admin information.
  20. CAVEATS:
  21. NOTES:
  22. HISTORY:
  23. NarenG 11/18/92 Modified for AFPMGR
  24. **************************************************************************/
  25. class NEW_VOLUME_SRVMGR_DIALOG : public DIALOG_WINDOW
  26. {
  27. private:
  28. SLE _sleVolumeName;
  29. SLE _sleVolumePath;
  30. SLE _slePassword;
  31. SLE _slePasswordConfirm;
  32. CHECKBOX _chkReadOnly;
  33. CHECKBOX _chkGuestAccess;
  34. MAGIC_GROUP _mgrpUserLimit;
  35. SPIN_SLE_NUM _spsleUsers;
  36. SPIN_GROUP _spgrpUsers;
  37. PUSH_BUTTON _pbPermissions;
  38. PUSH_BUTTON _pbOK;
  39. PUSH_BUTTON _pbCancel;
  40. NLS_STR _nlsServerName;
  41. NLS_STR _nlsOwner;
  42. NLS_STR _nlsGroup;
  43. DWORD _dwPerms;
  44. BOOL _fCommitDirInfo;
  45. AFP_SERVER_HANDLE _hServer;
  46. protected:
  47. virtual BOOL OnCommand( const CONTROL_EVENT & event );
  48. virtual BOOL OnOK( VOID );
  49. virtual ULONG QueryHelpContext( VOID );
  50. //
  51. // Query or set the contents of User Limit
  52. //
  53. DWORD QueryUserLimit( VOID ) const;
  54. //
  55. // Set Focus on the controls. This will be used when error occurs.
  56. //
  57. VOID SetFocusOnName( VOID )
  58. { _sleVolumeName.ClaimFocus(); _sleVolumeName.SelectString(); }
  59. VOID SetFocusOnPath( VOID )
  60. { _sleVolumePath.ClaimFocus(); _sleVolumePath.SelectString(); }
  61. VOID SetFocusOnPasswordConfirm( VOID )
  62. { _slePasswordConfirm.ClaimFocus(); _slePasswordConfirm.SelectString(); }
  63. public:
  64. NEW_VOLUME_SRVMGR_DIALOG( HWND hwndParent,
  65. AFP_SERVER_HANDLE hServer,
  66. const TCHAR * pszServerName );
  67. };
  68. /*************************************************************************
  69. NAME: NEW_VOLUME_FILEMGR_DIALOG
  70. SYNOPSIS: The class for new volume dialog contained in the file
  71. manager. It contains the magic group
  72. for User Limit, SLE for the path, checkboxes for volume
  73. properties, the OK, Cancel, Permissions button.
  74. admin information.
  75. CAVEATS:
  76. NOTES:
  77. HISTORY:
  78. NarenG 11/18/92 Modified for AFPMGR
  79. **************************************************************************/
  80. class NEW_VOLUME_FILEMGR_DIALOG : public DIALOG_WINDOW
  81. {
  82. private:
  83. SLE _sleVolumeName;
  84. SLE _sleVolumePath;
  85. SLE _slePassword;
  86. SLE _slePasswordConfirm;
  87. CHECKBOX _chkReadOnly;
  88. CHECKBOX _chkGuestAccess;
  89. MAGIC_GROUP _mgrpUserLimit;
  90. SPIN_SLE_NUM _spsleUsers;
  91. SPIN_GROUP _spgrpUsers;
  92. PUSH_BUTTON _pbPermissions;
  93. PUSH_BUTTON _pbOK;
  94. PUSH_BUTTON _pbCancel;
  95. NLS_STR _nlsOwner;
  96. NLS_STR _nlsGroup;
  97. DWORD _dwPerms;
  98. BOOL _fCommitDirInfo;
  99. protected:
  100. virtual BOOL OnCommand( const CONTROL_EVENT & event );
  101. virtual BOOL OnOK( VOID );
  102. virtual ULONG QueryHelpContext( VOID );
  103. //
  104. // Query or set the contents of User Limit
  105. //
  106. DWORD QueryUserLimit( VOID ) const;
  107. DWORD ValidateVolumePath( const WCHAR * pszPath );
  108. //
  109. // Set Focus on the controls. This will be used when error occurs.
  110. //
  111. VOID SetFocusOnName( VOID )
  112. { _sleVolumeName.ClaimFocus(); _sleVolumeName.SelectString(); }
  113. VOID SetFocusOnPath( VOID )
  114. { _sleVolumePath.ClaimFocus(); _sleVolumePath.SelectString(); }
  115. VOID SetFocusOnPasswordConfirm( VOID )
  116. { _slePasswordConfirm.ClaimFocus(); _slePasswordConfirm.SelectString(); }
  117. public:
  118. NEW_VOLUME_FILEMGR_DIALOG( HWND hwndParent,
  119. const TCHAR * pszPath,
  120. BOOL fIsFile );
  121. };
  122. #endif