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.

144 lines
4.7 KiB

  1. /*======================================================================================//
  2. | Process Control //
  3. | //
  4. |Copyright (c) 1998 Sequent Computer Systems, Incorporated. All rights reserved. //
  5. | //
  6. |File Name: ProcessPages.h //
  7. | //
  8. |Description: Definition of Process Property pages //
  9. | //
  10. |Created: Paul Skoglund 08-1998 //
  11. | //
  12. |Rev History: //
  13. | //
  14. |=======================================================================================*/
  15. #ifndef __PROCESSPAGES_H_
  16. #define __PROCESSPAGES_H_
  17. #include "Globals.h"
  18. #include "ppage.h"
  19. #include "container.h"
  20. #pragma warning(push)
  21. #include <list>
  22. #pragma warning(pop)
  23. using std::list;
  24. // property page helpers
  25. extern HRESULT CreatePropertyPagesForProcListItem(
  26. const PCProcListItem &ProcListItem,
  27. LPPROPERTYSHEETCALLBACK lpProvider,
  28. LONG_PTR handle,
  29. CBaseNode *BaseNodePtr );
  30. extern HRESULT CreatePropertyPagesForProcDetail(
  31. const PROC_NAME &procName,
  32. LPPROPERTYSHEETCALLBACK lpProvider,
  33. LONG_PTR handle,
  34. CBaseNode *BaseNodePtr );
  35. class CBaseNode;
  36. class CProcessIDPage :
  37. public CMySnapInPropertyPageImpl<CProcessIDPage>
  38. {
  39. public :
  40. CProcessIDPage(int nTitle, CProcDetailContainer *pContainer, list<tstring> *jobnames = NULL);
  41. ~CProcessIDPage();
  42. enum { IDD = IDD_PROCID_PAGE };
  43. CComBSTR m_bName;
  44. CComBSTR m_bComment;
  45. CComBSTR m_bJob;
  46. bool m_JobChk;
  47. BEGIN_MSG_MAP(CProcessIDPage)
  48. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  49. MESSAGE_HANDLER(WM_HELP, OnWMHelp)
  50. COMMAND_HANDLER(IDC_COMMENT, EN_CHANGE, OnEditChange)
  51. COMMAND_HANDLER(IDC_JOB_LIST, CBN_EDITCHANGE, OnEditChange)
  52. COMMAND_HANDLER(IDC_JOB_LIST, CBN_SELCHANGE, OnEditChange)
  53. COMMAND_HANDLER(IDC_JOBMEMBER_CHK, BN_CLICKED, OnJobChk)
  54. CHAIN_MSG_MAP(CMySnapInPropertyPageImpl<CProcessIDPage>)
  55. END_MSG_MAP()
  56. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  57. LRESULT OnWMHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  58. LRESULT OnEditChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  59. LRESULT OnJobChk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  60. BOOL OnHelp();
  61. BOOL OnKillActive() { return Validate(TRUE); }
  62. BOOL OnApply();
  63. BOOL UpdateData(BOOL bSaveAndValidate = TRUE);
  64. BOOL Validate(BOOL bSave = FALSE);
  65. void SetReadOnly() { m_bReadOnly = TRUE;}
  66. private:
  67. CProcDetailContainer *m_pProcContainer;
  68. BOOL m_bReadOnly;
  69. list<tstring> *m_pJobNames;
  70. union {
  71. struct
  72. {
  73. int procName : 1;
  74. int comment : 1;
  75. int jobChk : 1;
  76. int jobName : 1;
  77. } Fields;
  78. int on;
  79. } PageFields;
  80. };
  81. class CProcessUnmanagedPage :
  82. public CMySnapInPropertyPageImpl<CProcessUnmanagedPage>
  83. {
  84. public :
  85. CProcessUnmanagedPage(int nTitle, CNewProcDetailContainer *pProcContainer, const PCSystemParms sysParms, list<tstring> *jobnames = NULL);
  86. ~CProcessUnmanagedPage();
  87. enum { IDD = IDD_PROCDEF_PAGE };
  88. CComBSTR m_bName;
  89. BEGIN_MSG_MAP(CProcessUnmanagedPage)
  90. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  91. MESSAGE_HANDLER(WM_HELP, OnWMHelp)
  92. COMMAND_HANDLER(IDC_ADD, BN_CLICKED, OnAdd)
  93. CHAIN_MSG_MAP(CMySnapInPropertyPageImpl<CProcessUnmanagedPage>)
  94. END_MSG_MAP()
  95. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  96. LRESULT OnWMHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  97. LRESULT OnAdd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  98. BOOL OnHelp();
  99. BOOL OnKillActive() { return Validate(TRUE); }
  100. BOOL OnApply();
  101. BOOL UpdateData(BOOL bSaveAndValidate = TRUE);
  102. BOOL Validate(BOOL bSave = FALSE);
  103. void SetReadOnly() { m_bReadOnly = TRUE;}
  104. private:
  105. CNewProcDetailContainer *m_pProcContainer;
  106. BOOL m_bReadOnly;
  107. list<tstring> *m_pJobNames;
  108. PCSystemParms m_SystemParms;
  109. };
  110. #endif // __PROCESSPAGES_H_