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.

164 lines
4.0 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1994 - 1996.
  5. //
  6. // File: once.cxx
  7. //
  8. // Contents: Task wizard once trigger property page implementation.
  9. //
  10. // Classes: COncePage
  11. //
  12. // History: 4-28-1997 DavidMun Created
  13. //
  14. //---------------------------------------------------------------------------
  15. #include "..\pch\headers.hxx"
  16. #pragma hdrstop
  17. #include "myheaders.hxx"
  18. //+--------------------------------------------------------------------------
  19. //
  20. // Member: COncePage::COncePage
  21. //
  22. // Synopsis: ctor
  23. //
  24. // Arguments: [ptszFolderPath] - full path to tasks folder with dummy
  25. // filename appended
  26. // [phPSP] - filled with prop page handle
  27. //
  28. // History: 4-28-1997 DavidMun Created
  29. //
  30. //---------------------------------------------------------------------------
  31. COncePage::COncePage(
  32. CTaskWizard *pParent,
  33. LPTSTR ptszFolderPath,
  34. HPROPSHEETPAGE *phPSP):
  35. CTriggerPage(IDD_ONCE,
  36. IDS_ONCE_HDR2,
  37. ptszFolderPath,
  38. phPSP)
  39. {
  40. TRACE_CONSTRUCTOR(COncePage);
  41. }
  42. //+--------------------------------------------------------------------------
  43. //
  44. // Member: COncePage::~COncePage
  45. //
  46. // Synopsis: dtor
  47. //
  48. // History: 4-28-1997 DavidMun Created
  49. //
  50. //---------------------------------------------------------------------------
  51. COncePage::~COncePage()
  52. {
  53. TRACE_DESTRUCTOR(COncePage);
  54. }
  55. //===========================================================================
  56. //
  57. // CWizPage overrides
  58. //
  59. //===========================================================================
  60. //+--------------------------------------------------------------------------
  61. //
  62. // Member: COncePage::_OnInitDialog
  63. //
  64. // Synopsis: Perform initialization that should only occur once.
  65. //
  66. // Arguments: [lParam] - LPPROPSHEETPAGE used to create this page
  67. //
  68. // Returns: TRUE (let windows set focus)
  69. //
  70. // History: 5-20-1997 DavidMun Created
  71. //
  72. //---------------------------------------------------------------------------
  73. LRESULT
  74. COncePage::_OnInitDialog(
  75. LPARAM lParam)
  76. {
  77. TRACE_METHOD(COncePage, _OnInitDialog);
  78. _UpdateTimeFormat();
  79. return TRUE;
  80. }
  81. //+--------------------------------------------------------------------------
  82. //
  83. // Member: COncePage::_OnPSNSetActive
  84. //
  85. // Synopsis: Enable back and next buttons.
  86. //
  87. // History: 5-20-1997 DavidMun Created
  88. //
  89. // Notes: (This page can never have invalid data, so Next should
  90. // always be enabled.)
  91. //
  92. //---------------------------------------------------------------------------
  93. LRESULT
  94. COncePage::_OnPSNSetActive(
  95. LPARAM lParam)
  96. {
  97. _SetWizButtons(PSWIZB_BACK | PSWIZB_NEXT);
  98. return CPropPage::_OnPSNSetActive(lParam);
  99. }
  100. //===========================================================================
  101. //
  102. // CTriggerPage overrides
  103. //
  104. //===========================================================================
  105. //+--------------------------------------------------------------------------
  106. //
  107. // Member: COncePage::FillInTrigger
  108. //
  109. // Synopsis: Fill in the fields of the trigger structure according to the
  110. // settings specified for this type of trigger
  111. //
  112. // Arguments: [pTrigger] - trigger struct to fill in
  113. //
  114. // Modifies: *[pTrigger]
  115. //
  116. // History: 5-06-1997 DavidMun Created
  117. //
  118. // Notes: Precondition is that trigger's cbTriggerSize member is
  119. // initialized.
  120. //
  121. //---------------------------------------------------------------------------
  122. VOID
  123. COncePage::FillInTrigger(
  124. TASK_TRIGGER *pTrigger)
  125. {
  126. pTrigger->TriggerType = TASK_TIME_TRIGGER_ONCE;
  127. FillInStartDateTime(_hCtrl(startdate_dp), _hCtrl(starttime_dp), pTrigger);
  128. }