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.

117 lines
3.1 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation 1996-2001.
  5. //
  6. // File: ANumber.h
  7. //
  8. // Contents: Definition of CAttrNumber
  9. //
  10. //----------------------------------------------------------------------------
  11. #if !defined(AFX_ATTRNUMBER_H__76BA1B2F_D221_11D0_9C68_00C04FB6C6FA__INCLUDED_)
  12. #define AFX_ATTRNUMBER_H__76BA1B2F_D221_11D0_9C68_00C04FB6C6FA__INCLUDED_
  13. #if _MSC_VER >= 1000
  14. #pragma once
  15. #endif // _MSC_VER >= 1000
  16. #include "resource.h"
  17. #include "ddwarn.h"
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CAttrNumber dialog
  20. #define RDIF_MIN 0x0001
  21. #define RDIF_MAX 0x0002
  22. #define RDIF_END 0x0004
  23. #define RDIF_MAXINFINATE 0x0008
  24. typedef struct _tag_RANGEDESCRIPTION
  25. {
  26. int iMin;
  27. int iMax;
  28. WORD uResource;
  29. WORD uMask;
  30. } RANGEDESCRIPTION, *PRANGEDESCRIPTION;
  31. DWORD
  32. GetRangeDescription( // Sets [pstrRet] to the string corisponding to [uType] and [i]
  33. UINT uType,
  34. int i,
  35. CString *pstrRet
  36. );
  37. UINT
  38. GetRangeDescription( // Returns the string resource described by [pDesc] and [i]
  39. RANGEDESCRIPTION *pDesc,
  40. int i
  41. );
  42. extern RANGEDESCRIPTION g_rdMinPassword[];
  43. extern RANGEDESCRIPTION g_rdMaxPassword[];
  44. extern RANGEDESCRIPTION g_rdLockoutAccount[];
  45. extern RANGEDESCRIPTION g_rdPasswordLen[];
  46. class CAttrNumber : public CAttribute
  47. {
  48. // Construction
  49. public:
  50. void Initialize(CResult * pResult);
  51. virtual void SetInitialValue(DWORD_PTR dw);
  52. CAttrNumber(UINT nTemplateID); // standard constructor
  53. // Dialog Data
  54. //{{AFX_DATA(CAttrNumber)
  55. enum { IDD = IDD_ATTR_NUMBER };
  56. CSpinButtonCtrl m_SpinValue;
  57. CString m_strUnits;
  58. CString m_strSetting;
  59. CString m_strBase;
  60. CString m_strTemplateTitle;
  61. CString m_strLastInspectTitle;
  62. CString m_strError;
  63. //}}AFX_DATA
  64. // Overrides
  65. // ClassWizard generated virtual function overrides
  66. //{{AFX_VIRTUAL(CAttrNumber)
  67. protected:
  68. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  69. //}}AFX_VIRTUAL
  70. // Implementation
  71. protected:
  72. // Generated message map functions
  73. //{{AFX_MSG(CAttrNumber)
  74. virtual BOOL OnInitDialog();
  75. afx_msg void OnDeltaposSpin(NMHDR* pNMHDR, LRESULT* pResult);
  76. afx_msg void OnKillFocusNew();
  77. virtual BOOL OnApply();
  78. afx_msg void OnConfigure();
  79. afx_msg void OnUpdateNew();
  80. virtual BOOL OnKillActive();
  81. //}}AFX_MSG
  82. DECLARE_MESSAGE_MAP()
  83. protected:
  84. int m_cMinutes;
  85. long m_nLow;
  86. long m_nHigh;
  87. DWORD_PTR m_nSave;
  88. int m_iNeverId;
  89. int m_iAccRate;
  90. int m_iStaticId;
  91. RANGEDESCRIPTION *m_pRDescription;
  92. CDlgDependencyWarn DDWarn;
  93. public:
  94. LONG CurrentEditValue();
  95. void SetValueToEdit(LONG lVal);
  96. };
  97. //{{AFX_INSERT_LOCATION}}
  98. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  99. #endif // !defined(AFX_ATTRNUMBER_H__76BA1B2F_D221_11D0_9C68_00C04FB6C6FA__INCLUDED_)