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.

151 lines
3.7 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1994 - 1996.
  5. //
  6. // File: trigpage.cxx
  7. //
  8. // Contents: Implementation of common trigger page class
  9. //
  10. // Classes: CTriggerPage
  11. //
  12. // History: 5-06-1997 DavidMun Created
  13. //
  14. //---------------------------------------------------------------------------
  15. #include "..\pch\headers.hxx"
  16. #pragma hdrstop
  17. #include "myheaders.hxx"
  18. //+--------------------------------------------------------------------------
  19. //
  20. // Member: CTriggerPage::CTriggerPage
  21. //
  22. // Synopsis: ctor
  23. //
  24. // Arguments: [iddPage] - resource id of trigger page dialog
  25. // [idsHeader2] - resource id of sub-title string
  26. // [ptszFolderPath] - tasks folder path
  27. // [phPSP] - filled with handle returned by
  28. // CreatePropertySheetPage
  29. //
  30. // History: 5-20-1997 DavidMun Created
  31. //
  32. //---------------------------------------------------------------------------
  33. CTriggerPage::CTriggerPage(
  34. ULONG iddPage,
  35. ULONG idsHeader2,
  36. LPTSTR ptszFolderPath,
  37. HPROPSHEETPAGE *phPSP):
  38. CWizPage(MAKEINTRESOURCE(iddPage), ptszFolderPath)
  39. {
  40. _CreatePage(IDS_TRIGGER_HDR1, idsHeader2, phPSP);
  41. }
  42. //+--------------------------------------------------------------------------
  43. //
  44. // Member: CTriggerPage::_UpdateTimeFormat
  45. //
  46. // Synopsis: Update the start time datetimepicker control's time format
  47. //
  48. // History: 07-20-1997 DavidMun Created
  49. //
  50. //---------------------------------------------------------------------------
  51. void
  52. CTriggerPage::_UpdateTimeFormat()
  53. {
  54. ::UpdateTimeFormat(_tszTimeFormat, ARRAYLEN(_tszTimeFormat));
  55. DateTime_SetFormat(_hCtrl(starttime_dp), _tszTimeFormat);
  56. }
  57. //===========================================================================
  58. //
  59. // CPropPage overrides
  60. //
  61. //===========================================================================
  62. //+--------------------------------------------------------------------------
  63. //
  64. // Member: CTriggerPage::_OnWinIniChange
  65. //
  66. // Synopsis: Handle win.ini settings change
  67. //
  68. // History: 07-20-1997 DavidMun Created
  69. //
  70. //---------------------------------------------------------------------------
  71. LRESULT
  72. CTriggerPage::_OnWinIniChange(
  73. WPARAM wParam,
  74. LPARAM lParam)
  75. {
  76. _UpdateTimeFormat();
  77. return FALSE;
  78. }
  79. //===========================================================================
  80. //
  81. // CWizPage overrides
  82. //
  83. //===========================================================================
  84. //+--------------------------------------------------------------------------
  85. //
  86. // Member: CTriggerPage::_OnWizBack
  87. //
  88. // Synopsis: Set the current page to the select trigger page.
  89. //
  90. // History: 5-20-1997 DavidMun Created
  91. //
  92. //---------------------------------------------------------------------------
  93. LRESULT
  94. CTriggerPage::_OnWizBack()
  95. {
  96. TRACE_METHOD(CTriggerPage, _OnWizBack);
  97. SetWindowLongPtr(Hwnd(), DWLP_MSGRESULT, IDD_SELECT_TRIGGER);
  98. return -1;
  99. }
  100. //+--------------------------------------------------------------------------
  101. //
  102. // Member: CTriggerPage::_OnWizNext
  103. //
  104. // Synopsis: Advance to the next page
  105. //
  106. // History: 5-20-1997 DavidMun Created
  107. //
  108. //---------------------------------------------------------------------------
  109. LRESULT
  110. CTriggerPage::_OnWizNext()
  111. {
  112. TRACE_METHOD(CTriggerPage, _OnWizNext);
  113. SetWindowLongPtr(Hwnd(), DWLP_MSGRESULT, IDD_PASSWORD);
  114. return -1;
  115. }