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
4.4 KiB

  1. /*======================================================================================//
  2. | Process Control //
  3. | //
  4. |Copyright (c) 1998 Sequent Computer Systems, Incorporated. All rights reserved. //
  5. | //
  6. |File Name: JobsPages.h //
  7. | //
  8. |Description: Definition of Job Property pages //
  9. | //
  10. |Created: Paul Skoglund 09-1998 //
  11. | //
  12. |Rev History: //
  13. | //
  14. |=======================================================================================*/
  15. #ifndef __JOBPAGES_H_
  16. #define __JOBPAGES_H_
  17. #include "Globals.h"
  18. #include "ppage.h"
  19. #include "container.h"
  20. extern HRESULT CreatePropertyPagesForJobListItem(
  21. const PCJobListItem &JobListItem,
  22. LPPROPERTYSHEETCALLBACK lpProvider,
  23. LONG_PTR handle,
  24. CBaseNode *BaseNodePtr );
  25. extern HRESULT CreatePropertyPagesForJobDetail(
  26. const JOB_NAME &jobName,
  27. LPPROPERTYSHEETCALLBACK lpProvider,
  28. LONG_PTR handle,
  29. CBaseNode *BaseNodePtr );
  30. class CBaseNode;
  31. class CJobIDPage :
  32. public CMySnapInPropertyPageImpl<CJobIDPage>
  33. {
  34. public :
  35. CJobIDPage(int nTitle, CJobDetailContainer *pContainer);
  36. ~CJobIDPage();
  37. enum { IDD = IDD_JOBID_PAGE };
  38. CComBSTR m_bJob;
  39. CComBSTR m_bComment;
  40. bool m_processcountchk;
  41. PROC_COUNT m_processcount;
  42. BEGIN_MSG_MAP(CJobIDPage)
  43. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  44. MESSAGE_HANDLER(WM_HELP, OnWMHelp)
  45. COMMAND_HANDLER(IDC_JOB, EN_CHANGE, OnEditChange)
  46. COMMAND_HANDLER(IDC_COMMENT, EN_CHANGE, OnEditChange)
  47. COMMAND_HANDLER(IDC_PROCESSCOUNT, EN_CHANGE, OnEditChange)
  48. COMMAND_HANDLER(IDC_PROCESSCOUNT_CHK, BN_CLICKED, OnChk)
  49. CHAIN_MSG_MAP(CMySnapInPropertyPageImpl<CJobIDPage>)
  50. END_MSG_MAP()
  51. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  52. LRESULT OnWMHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  53. LRESULT OnEditChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  54. LRESULT OnChk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  55. BOOL OnHelp();
  56. BOOL OnKillActive() { return Validate(TRUE); }
  57. BOOL OnApply();
  58. BOOL UpdateData(BOOL bSaveAndValidate = TRUE);
  59. BOOL Validate(BOOL bSave = FALSE);
  60. void SetReadOnly() { m_bReadOnly = TRUE;}
  61. private:
  62. CJobDetailContainer *m_pJobContainer;
  63. BOOL m_bReadOnly;
  64. union {
  65. struct
  66. {
  67. int jobName : 1;
  68. int comment : 1;
  69. int processcountchk : 1;
  70. int processcount : 1;
  71. } Fields;
  72. int on;
  73. } PageFields;
  74. };
  75. class CJobUnmanagedPage :
  76. public CMySnapInPropertyPageImpl<CJobUnmanagedPage>
  77. {
  78. public :
  79. CJobUnmanagedPage(int nTitle, CNewJobDetailContainer *pContainer, const PCSystemParms sysParms);
  80. ~CJobUnmanagedPage();
  81. enum { IDD = IDD_JOBDEF_PAGE };
  82. CComBSTR m_bName;
  83. BEGIN_MSG_MAP(CJobUnmanagedPage)
  84. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  85. MESSAGE_HANDLER(WM_HELP, OnWMHelp)
  86. COMMAND_HANDLER(IDC_ADD, BN_CLICKED, OnAdd)
  87. CHAIN_MSG_MAP(CMySnapInPropertyPageImpl<CJobUnmanagedPage>)
  88. END_MSG_MAP()
  89. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  90. LRESULT OnWMHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  91. LRESULT OnAdd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  92. BOOL OnHelp();
  93. BOOL OnKillActive() { return Validate(TRUE); }
  94. BOOL OnApply();
  95. BOOL UpdateData(BOOL bSaveAndValidate = TRUE);
  96. BOOL Validate(BOOL bSave = FALSE);
  97. void SetReadOnly() { m_bReadOnly = TRUE;}
  98. private:
  99. CNewJobDetailContainer *m_pJobContainer;
  100. BOOL m_bReadOnly;
  101. PCSystemParms m_SystemParms;
  102. };
  103. #endif // __JOBPAGES_H_