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.

105 lines
3.8 KiB

  1. //
  2. //
  3. //
  4. #ifndef _PROCESS_OPT_H
  5. #define _PROCESS_OPT_H
  6. #include "resource.h"
  7. #include "ExchControls.h"
  8. #include "PropSheet.h"
  9. #define TIMEOUT_MIN (int)0
  10. #define TIMEOUT_MAX (int)(INT_MAX/1000)
  11. #define TIMESPAN_MIN (int)0
  12. #define TIMESPAN_MAX (int)(INT_MAX/1000)
  13. #define REQUESTS_MIN (int)0
  14. #define REQUESTS_MAX (int)(INT_MAX/1000)
  15. class CProcessOptPage :
  16. public WTL::CPropertyPageImpl<CProcessOptPage>,
  17. public WTL::CWinDataExchange<CProcessOptPage>
  18. {
  19. typedef WTL::CPropertyPageImpl<CProcessOptPage> baseClass;
  20. public:
  21. CProcessOptPage(CAppData * pData)
  22. {
  23. m_pData = pData;
  24. }
  25. ~CProcessOptPage()
  26. {
  27. }
  28. enum {IDD = IDD_PROCESS_OPT};
  29. BEGIN_MSG_MAP_EX(CProcessOptPage)
  30. MSG_WM_INITDIALOG(OnInitDialog)
  31. MSG_WM_COMPAREITEM(OnCompareItem)
  32. MSG_WM_DRAWITEM(OnDrawItem)
  33. MSG_WM_MEASUREITEM(OnMeasureItem)
  34. COMMAND_HANDLER_EX(IDC_LOG_FAILS, BN_CLICKED, OnChangeData)
  35. COMMAND_HANDLER_EX(IDC_DEBUG_EXCEPTION, BN_CLICKED, OnChangeData)
  36. COMMAND_HANDLER_EX(IDC_RECYCLE_TIMESPAN, BN_CLICKED, OnRecycleTimespan)
  37. COMMAND_HANDLER_EX(IDC_RECYCLE_REQUESTS, BN_CLICKED, OnRecycleRequest)
  38. COMMAND_HANDLER_EX(IDC_RECYCLE_TIMER, BN_CLICKED, OnRecycleTimer)
  39. COMMAND_HANDLER_EX(IDC_ADD_TIME, BN_CLICKED, OnAddTimer)
  40. COMMAND_HANDLER_EX(IDC_CHANGE_TIME, BN_CLICKED, OnChangeTimer)
  41. COMMAND_HANDLER_EX(IDC_DELETE_TIME, BN_CLICKED, OnDeleteTimer)
  42. COMMAND_HANDLER_EX(IDC_TIMES_LIST, LBN_SELCHANGE, OnTimeSelChanged);
  43. COMMAND_HANDLER_EX(IDC_TIMES_LIST, LBN_DBLCLK, OnChangeTimer);
  44. COMMAND_HANDLER_EX(IDC_CGI_TIMEOUT, EN_CHANGE, OnChangeData);
  45. COMMAND_HANDLER_EX(IDC_TIMESPAN, EN_CHANGE, OnChangeData);
  46. COMMAND_HANDLER_EX(IDC_REQUEST_LIMIT, EN_CHANGE, OnChangeData);
  47. CHAIN_MSG_MAP(baseClass)
  48. END_MSG_MAP()
  49. BEGIN_DDX_MAP(CProcessOptPage)
  50. DDX_CHECK(IDC_LOG_FAILS, m_pData->m_LogFailures)
  51. DDX_CHECK(IDC_DEBUG_EXCEPTION, m_pData->m_DebugExcept)
  52. DDX_INT_RANGE(IDC_CGI_TIMEOUT, m_pData->m_CgiTimeout, TIMEOUT_MIN, TIMEOUT_MAX)
  53. DDX_CHECK(IDC_RECYCLE_TIMESPAN, m_pData->m_RecycleTimespan)
  54. DDX_INT_RANGE(IDC_TIMESPAN, m_pData->m_Timespan, TIMESPAN_MIN, TIMESPAN_MAX)
  55. DDX_CHECK(IDC_RECYCLE_REQUESTS, m_pData->m_RecycleRequest)
  56. DDX_INT_RANGE(IDC_REQUEST_LIMIT, m_pData->m_Requests, REQUESTS_MIN, REQUESTS_MAX)
  57. DDX_CHECK(IDC_RECYCLE_TIMER, m_pData->m_RecycleTimer)
  58. DDX_CONTROL(IDC_TIMESPAN, m_TimespanCtrl)
  59. DDX_CONTROL(IDC_REQUEST_LIMIT, m_RequestCtrl)
  60. DDX_CONTROL(IDC_TIMEOUT_SPIN, m_TimeoutSpin)
  61. DDX_CONTROL(IDC_TIMESPAN_SPIN, m_TimespanSpin)
  62. DDX_CONTROL(IDC_REQUESTS_SPIN, m_RequestSpin)
  63. DDX_CONTROL(IDC_TIMES_LIST, m_TimerList)
  64. DDX_CONTROL(IDC_ADD_TIME, m_AddTimer)
  65. DDX_CONTROL(IDC_CHANGE_TIME, m_ChangeTimer)
  66. DDX_CONTROL(IDC_DELETE_TIME, m_DeleteTimer)
  67. END_DDX_MAP()
  68. LRESULT OnInitDialog(HWND hDlg, LPARAM lParam);
  69. LRESULT OnCompareItem(UINT nID, LPCOMPAREITEMSTRUCT cmpi);
  70. LRESULT OnDrawItem(UINT nID, LPDRAWITEMSTRUCT di);
  71. LRESULT OnMeasureItem(UINT nID, LPMEASUREITEMSTRUCT mi);
  72. void OnRecycleTimespan(UINT nCode, UINT nID, HWND hWnd);
  73. void OnRecycleRequest(UINT nSBCode, UINT nPos, HWND hwnd);
  74. void OnRecycleTimer(UINT nSBCode, UINT nPos, HWND hwnd);
  75. void OnAddTimer(UINT nSBCode, UINT nPos, HWND hwnd);
  76. void OnChangeTimer(UINT nSBCode, UINT nPos, HWND hwnd);
  77. void OnDeleteTimer(UINT nSBCode, UINT nPos, HWND hwnd);
  78. void OnTimeSelChanged(UINT nSBCode, UINT nPos, HWND hwnd);
  79. void OnChangeData(UINT nCode, UINT nID, HWND hWnd)
  80. {
  81. SET_MODIFIED(TRUE);
  82. }
  83. BOOL OnKillActive();
  84. protected:
  85. CAppData * m_pData;
  86. CEditExch m_TimespanCtrl, m_RequestCtrl;
  87. CListBoxExch m_TimerList;
  88. CButtonExch m_AddTimer;
  89. CButtonExch m_ChangeTimer;
  90. CButtonExch m_DeleteTimer;
  91. CUpDownCtrlExch m_TimeoutSpin;
  92. CUpDownCtrlExch m_TimespanSpin;
  93. CUpDownCtrlExch m_RequestSpin;
  94. };
  95. #endif //_PROCESS_OPT_H