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.

183 lines
4.1 KiB

  1. /**********************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. Add_Dlg.hxx
  7. This File contains the definitions for the various Add dialogs
  8. FILE HISTORY:
  9. Johnl 13-Sep-1991 Created
  10. */
  11. #ifndef _ADD_DLG_HXX_
  12. #define _ADD_DLG_HXX_
  13. #include <usrbrows.hxx>
  14. #define CID_ADD_BASE CID_PERM_LAST
  15. #define LB_ADD_SUBJECT_LISTBOX (CID_ADD_BASE+1)
  16. #define CB_ADD_PERMNAME (CID_ADD_BASE+2)
  17. #ifndef RC_INVOKED
  18. /*************************************************************************
  19. NAME: ADD_DIALOG
  20. SYNOPSIS: This class is the basic add subject dialog for Lanman
  21. file/directories.
  22. CODEWORK - This should be collapsed into
  23. ADD_PERM_DIALOG.
  24. INTERFACE:
  25. PARENT:
  26. USES:
  27. CAVEATS:
  28. NOTES:
  29. HISTORY:
  30. Johnl 13-Sep-1991 Created
  31. **************************************************************************/
  32. class ADD_DIALOG : public PERM_BASE_DLG
  33. {
  34. private:
  35. SUBJECT_LISTBOX _lbSubjects ;
  36. /* Will contain the array of selected indices when the user presses OK
  37. */
  38. BUFFER _buffLBSelection ;
  39. protected:
  40. /* Gets the list of selected subjects from the listbox.
  41. */
  42. virtual BOOL OnOK( void ) ;
  43. ULONG virtual QueryHelpContext( void ) ;
  44. public:
  45. ADD_DIALOG( const TCHAR * pszDialogName,
  46. HWND hwndParent,
  47. const TCHAR * pchResType,
  48. const TCHAR * pchResName,
  49. const TCHAR * pchHelpFileName,
  50. ULONG * ahcHelp,
  51. const TCHAR * pchDialogTitle,
  52. LOCATION & EnumLocation ) ;
  53. SUBJECT * RemoveSubject( INT iSelection ) ;
  54. INT QuerySelectedSubjectCount( void )
  55. { return _buffLBSelection.QuerySize() / sizeof( INT ) ; }
  56. } ;
  57. /*************************************************************************
  58. NAME: ADD_PERM_DIALOG
  59. SYNOPSIS: This dialog contains the same info as the ADD_DIALOG
  60. with the addition of a combo that contains the possible
  61. permission names
  62. INTERFACE:
  63. PARENT: ADD_DIALOG
  64. USES: COMBOBOX, MASK_MAP, BITFIELD
  65. CAVEATS:
  66. NOTES:
  67. HISTORY:
  68. Johnl 13-Sep-1991 Created
  69. **************************************************************************/
  70. class ADD_PERM_DIALOG : public ADD_DIALOG
  71. {
  72. private:
  73. COMBOBOX _cbPermNames ;
  74. MASK_MAP * _pmaskmapPermNames ;
  75. public:
  76. ADD_PERM_DIALOG( const TCHAR * pszDialogName,
  77. HWND hwndParent,
  78. const TCHAR * pchResType,
  79. const TCHAR * pchResName,
  80. const TCHAR * pchHelpFileName,
  81. ULONG * ahcHelp,
  82. const TCHAR * pchDialogTitle,
  83. MASK_MAP * pmaskmapPermNames,
  84. LOCATION & EnumLocation,
  85. const TCHAR * pszDefaultPermName ) ;
  86. APIERR QueryPermBitMask( BITFIELD * pPermBits ) ;
  87. } ;
  88. /*************************************************************************
  89. NAME: SED_NT_USER_BROWSER_DIALOG
  90. SYNOPSIS: This class is a simple derivation of the user browser that
  91. adds a permission name combo at the bottom.
  92. INTERFACE:
  93. PARENT: NT_USER_BROWSER_DIALOG
  94. USES: MASK_MAP
  95. CAVEATS:
  96. NOTES:
  97. HISTORY:
  98. Johnl 11-Mar-1992 Created
  99. **************************************************************************/
  100. class SED_NT_USER_BROWSER_DIALOG : public NT_USER_BROWSER_DIALOG
  101. {
  102. public:
  103. SED_NT_USER_BROWSER_DIALOG( HWND hwndOwner,
  104. const TCHAR * pszServerResourceLivesOn,
  105. MASK_MAP * pmaskmapGenPerms,
  106. BOOL fIsContainer,
  107. const TCHAR * pszDefaultPermName,
  108. const TCHAR * pszHelpFileName,
  109. ULONG * ahcHelp ) ;
  110. ~SED_NT_USER_BROWSER_DIALOG() ;
  111. APIERR QuerySelectedPermName( NLS_STR * pnlsSelectedPermName )
  112. { return _cbPermNames.QueryItemText( pnlsSelectedPermName ) ; }
  113. private:
  114. COMBOBOX _cbPermNames ;
  115. MASK_MAP * _pmaskmapGenPerms ;
  116. } ;
  117. #endif //RC_INVOKED
  118. #endif //_ADD_DLG_HXX_