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.

136 lines
3.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation 1996-2001.
  5. //
  6. // File: addgrp.h
  7. //
  8. // Contents: definition of CSCEAddGroup
  9. //
  10. //----------------------------------------------------------------------------
  11. #if !defined(AFX_SCEADDGROUP_H__66CF106B_7057_11D2_A798_00C04FD92F7B__INCLUDED_)
  12. #define AFX_SCEADDGROUP_H__66CF106B_7057_11D2_A798_00C04FD92F7B__INCLUDED_
  13. #if _MSC_VER > 1000
  14. #pragma once
  15. #endif // _MSC_VER > 1000
  16. #include "HelpDlg.h"
  17. #define IDS_INVALID_USERNAME_CHARS L"*"
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CSCEAddGroup dialog
  20. #ifndef IsSpace
  21. //
  22. // Useful macro for checking to see if a character represents white space
  23. //
  24. #define IsSpace( x ) ((x) == L' ' || ((x) >= 0x09 && (x) <= 0x0D))
  25. #endif
  26. class CSCEAddGroup : public CHelpDialog
  27. {
  28. // Construction
  29. public:
  30. CSCEAddGroup(CWnd* pParent = NULL); // standard constructor
  31. virtual ~CSCEAddGroup();
  32. //
  33. // Returns the list of groups/users chosen by the user.
  34. //
  35. PSCE_NAME_LIST GetUsers()
  36. { return m_pnlGroup; };
  37. //
  38. // Tell the group box which mode we're running under so we can display
  39. // appropriate options when browsing.
  40. //
  41. void SetModeBits(DWORD dwModeBits)
  42. {
  43. m_dwModeBits = dwModeBits;
  44. };
  45. // Dialog Data
  46. //{{AFX_DATA(CSCEAddGroup)
  47. enum { IDD = IDD_APPLY_CONFIGURATION };
  48. //}}AFX_DATA
  49. // Overrides
  50. // ClassWizard generated virtual function overrides
  51. //{{AFX_VIRTUAL(CSCEAddGroup)
  52. protected:
  53. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  54. //}}AFX_VIRTUAL
  55. // Implementation
  56. protected:
  57. //
  58. // If a string is added, then it will be underlined in the display.
  59. //
  60. BOOL AddKnownAccount( LPCTSTR pszAccount );
  61. //
  62. // Returns TRUE if [pszAccount] was added by a call to AddKnownAccount.
  63. //
  64. BOOL IsKnownAccount( LPCTSTR pszAccount );
  65. //
  66. // Removes leading and trailing space characters.
  67. //
  68. void CleanName( LPTSTR pszAccount );
  69. //
  70. // Underlines all names in the KnownAccount list.
  71. //
  72. void UnderlineNames();
  73. //
  74. // Creates a name list from the text of the edit box.
  75. //
  76. int CreateNameList( PSCE_NAME_LIST *pNameList );
  77. //
  78. // Verfies the account names.
  79. //
  80. BOOL CheckNames();
  81. // Generated message map functions
  82. //{{AFX_MSG(CSCEAddGroup)
  83. afx_msg void OnBrowse();
  84. virtual BOOL OnInitDialog();
  85. afx_msg void OnChangeLogFile();
  86. virtual void OnOK();
  87. afx_msg void OnEditMsgFilter( NMHDR *pNM, LRESULT *pResult);
  88. afx_msg void OnChecknames();
  89. //}}AFX_MSG
  90. DECLARE_MESSAGE_MAP()
  91. //
  92. // Retrieve flags appropriate to our current mode.
  93. //
  94. DWORD GetModeFlags();
  95. DWORD m_dwModeBits;
  96. protected:
  97. //
  98. // The users/groups chosen or typed in by the user.
  99. //
  100. PSCE_NAME_LIST m_pnlGroup;
  101. //
  102. // List of known names which will be underlined in the UI.
  103. //
  104. PSCE_NAME_LIST m_pKnownNames;
  105. public:
  106. //
  107. // If m_sTitle, is not empty when the dialog is invoked, the string
  108. // will be used as the title. m_sDescription is the title for the group
  109. // box
  110. //
  111. CString m_sTitle, m_sDescription;
  112. //
  113. // Flags that will be passed to CGetUser. This is the SCE_SHOW* flags.
  114. // This class initializes the flag to everything in the constructor
  115. //
  116. DWORD m_dwFlags;
  117. BOOL m_fCheckName; //Raid #404989
  118. };
  119. //{{AFX_INSERT_LOCATION}}
  120. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  121. #endif // !defined(AFX_SCEADDGROUP_H__66CF106B_7057_11D2_A798_00C04FD92F7B__INCLUDED_)