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.

121 lines
3.4 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1998 **/
  4. /**********************************************************************/
  5. /*
  6. pgconst.h
  7. Definition of CPgConstraints -- property page to edit
  8. profile attributes related to constraints
  9. FILE HISTORY:
  10. */
  11. #if !defined(AFX_PGCONST_H__8C28D93C_2A69_11D1_853E_00C04FC31FD3__INCLUDED_)
  12. #define AFX_PGCONST_H__8C28D93C_2A69_11D1_853E_00C04FC31FD3__INCLUDED_
  13. #if _MSC_VER >= 1000
  14. #pragma once
  15. #endif // _MSC_VER >= 1000
  16. // PgConst.h : header file
  17. //
  18. #include "rasdial.h"
  19. #include "resource.h"
  20. #include "listctrl.h"
  21. #include "timeofday.h"
  22. // hour map is an array of bit, each bit maps to a hour
  23. // total 1 week(7 days), 7 * 24 = 21 BYTES
  24. void StrArrayToHourMap(CStrArray& array, BYTE* map);
  25. void HourMapToStrArray(BYTE* map, CStrArray& array, BOOL bLocalized);
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CPgConstraintsMerge dialog
  28. class CPgConstraintsMerge : public CManagedPage
  29. {
  30. DECLARE_DYNCREATE(CPgConstraintsMerge)
  31. // Construction
  32. public:
  33. void EnableSettings();
  34. CPgConstraintsMerge(CRASProfileMerge* profile = NULL);
  35. ~CPgConstraintsMerge();
  36. // Dialog Data
  37. //{{AFX_DATA(CPgConstraintsMerge)
  38. enum { IDD = IDD_CONSTRAINTS_MERGE };
  39. CButton m_CheckPortTypes;
  40. CListCtrlEx m_listPortTypes;
  41. CButton m_CheckSessionLen;
  42. CButton m_CheckIdle;
  43. CButton m_ButtonEditTimeOfDay;
  44. CListBox m_ListTimeOfDay;
  45. CSpinButtonCtrl m_SpinMaxSession;
  46. CSpinButtonCtrl m_SpinIdleTime;
  47. CEdit m_EditMaxSession;
  48. CEdit m_EditIdleTime;
  49. BOOL m_bCallNumber;
  50. BOOL m_bRestrictedToPeriod;
  51. UINT m_dwMaxSession;
  52. UINT m_dwIdle;
  53. CString m_strCalledNumber;
  54. BOOL m_bIdle;
  55. BOOL m_bSessionLen;
  56. UINT m_dwMaxSession1;
  57. BOOL m_bPortTypes;
  58. //}}AFX_DATA
  59. // Overrides
  60. // ClassWizard generate virtual function overrides
  61. //{{AFX_VIRTUAL(CPgConstraintsMerge)
  62. public:
  63. virtual BOOL OnApply();
  64. virtual BOOL OnKillActive();
  65. protected:
  66. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  67. //}}AFX_VIRTUAL
  68. // Implementation
  69. protected:
  70. void EnableIdleSettings(BOOL bEnable);
  71. void EnableSessionSettings(BOOL bEnable);
  72. void EnableTimeOfDay(BOOL bEnable);
  73. void EnableMediaSelection(BOOL bEnable);
  74. void EnableCalledStation(BOOL bEnable);
  75. // Generated message map functions
  76. //{{AFX_MSG(CPgConstraintsMerge)
  77. virtual BOOL OnInitDialog();
  78. afx_msg void OnChangeEditmaxsession();
  79. afx_msg void OnChangeEditidletime();
  80. afx_msg void OnCheckcallnumber();
  81. afx_msg void OnCheckrestrictperiod();
  82. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  83. afx_msg void OnButtonedittimeofday();
  84. afx_msg void OnChangeEditcallnumber();
  85. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  86. afx_msg void OnCheckidle();
  87. afx_msg void OnChecksessionlen();
  88. afx_msg void OnCheckPorttypes();
  89. afx_msg void OnItemclickListPorttypes(NMHDR* pNMHDR, LRESULT* pResult);
  90. //}}AFX_MSG
  91. DECLARE_MESSAGE_MAP()
  92. CRASProfileMerge* m_pProfile;
  93. bool m_bInited;
  94. // the hour map timeofday
  95. BYTE m_TimeOfDayHoursMap[21];
  96. // the data array to store the time -- localized
  97. CStrArray m_strArrayTimeOfDayDisplay;
  98. CStrBox<CListBox>* m_pBox;
  99. };
  100. //{{AFX_INSERT_LOCATION}}
  101. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  102. #endif // !defined(AFX_PGCONST_H__8C28D93C_2A69_11D1_853E_00C04FC31FD3__INCLUDED_)