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.

94 lines
3.3 KiB

  1. #ifndef __DSKQUOTA_ADDUSER_DIALOG_H
  2. #define __DSKQUOTA_ADDUSER_DIALOG_H
  3. ///////////////////////////////////////////////////////////////////////////////
  4. /* File: adusrdlg.h
  5. Description: Provides declarations for the "Add User" dialog.
  6. Revision History:
  7. Date Description Programmer
  8. -------- --------------------------------------------------- ----------
  9. 06/15/98 Initial creation. BrianAu
  10. Separated code from userprop.h
  11. */
  12. ///////////////////////////////////////////////////////////////////////////////
  13. #ifndef _INC_DSKQUOTA_H
  14. # include "dskquota.h"
  15. #endif
  16. #ifndef _INC_DSKQUOTA_USER_H
  17. # include "user.h"
  18. #endif
  19. #ifndef _INC_DSKQUOTA_UNDO_H
  20. # include "undo.h"
  21. #endif
  22. #ifndef _INC_DSKQUOTA_DETAILS_H
  23. # include "details.h" // For LVSelection
  24. #endif
  25. #ifndef __OBJSEL_H_
  26. # include <objsel.h>
  27. #endif
  28. #include "resource.h"
  29. class AddUserDialog
  30. {
  31. public:
  32. //
  33. // Prop sheet for editing users.
  34. //
  35. AddUserDialog(PDISKQUOTA_CONTROL pQuotaControl,
  36. const CVolumeID& idVolume,
  37. HINSTANCE hInstance,
  38. HWND hwndParent,
  39. HWND hwndDetailsLV,
  40. UndoList& UndoList);
  41. virtual ~AddUserDialog(VOID);
  42. HRESULT Run(VOID);
  43. private:
  44. enum { iICON_USER_SINGLE, iICON_USER_MULTIPLE, cUSER_ICONS };
  45. LONGLONG m_cVolumeMaxBytes;
  46. LONGLONG m_llQuotaLimit;
  47. LONGLONG m_llQuotaThreshold;
  48. PDISKQUOTA_CONTROL m_pQuotaControl;
  49. UndoList& m_UndoList;
  50. HINSTANCE m_hInstance;
  51. HWND m_hwndParent;
  52. HWND m_hwndDetailsLV;
  53. DS_SELECTION_LIST *m_pSelectionList;
  54. CLIPFORMAT m_cfSelectionList;
  55. CVolumeID m_idVolume;
  56. HICON m_hIconUser[cUSER_ICONS]; // 0=Single, 1=Multi-user.
  57. XBytes *m_pxbQuotaLimit;
  58. XBytes *m_pxbQuotaThreshold;
  59. INT_PTR OnInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam);
  60. INT_PTR OnCommand(HWND hDlg, WPARAM wParam, LPARAM lParam);
  61. INT_PTR OnHelp(HWND hDlg, WPARAM wParam, LPARAM lParam);
  62. INT_PTR OnContextMenu(HWND hwndItem, int xPos, int yPos);
  63. INT_PTR OnEditNotifyUpdate(HWND hDlg, WPARAM wParam, LPARAM lParam);
  64. INT_PTR OnComboNotifySelChange(HWND hDlg, WPARAM wParam, LPARAM lParam);
  65. INT_PTR OnOk(HWND hDlg, WPARAM wParam, LPARAM lParam);
  66. HRESULT ApplySettings(HWND hDlg, bool bUndo = true);
  67. HRESULT BrowseForUsers(HWND hwndParent, IDataObject **ppdtobj);
  68. LPCWSTR GetDsSelUserName(const DS_SELECTION& sel);
  69. HRESULT GetDsSelUserSid(const DS_SELECTION& sel, LPBYTE pbSid, int cbSid);
  70. HRESULT HexCharsToByte(LPTSTR pszByte, LPBYTE pb);
  71. static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  72. //
  73. // Prevent copy.
  74. //
  75. AddUserDialog(const AddUserDialog&);
  76. void operator = (const AddUserDialog&);
  77. };
  78. #endif // __DSKQUOTA_ADDUSER_DIALOG_H