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.

95 lines
1.6 KiB

  1. // Copyright (c) 1997-2001 Microsoft Corporation
  2. //
  3. // File: CYSWizardPage.cpp
  4. //
  5. // Synopsis: Defines the base class for the wizard
  6. // pages used for CYS. It is a subclass
  7. // of WizardPage found in Burnslib
  8. //
  9. // History: 02/03/2001 JeffJon Created
  10. #include "pch.h"
  11. #include "resource.h"
  12. #include "CYSWizardPage.h"
  13. #include "State.h"
  14. CYSWizardPage::CYSWizardPage(
  15. int dialogResID,
  16. int titleResID,
  17. int subtitleResID,
  18. PCWSTR pageHelpString,
  19. bool hasHelp,
  20. bool isInteriorPage)
  21. :
  22. WizardPage(dialogResID, titleResID, subtitleResID, isInteriorPage, hasHelp)
  23. {
  24. LOG_CTOR(CYSWizardPage);
  25. if (hasHelp)
  26. {
  27. ASSERT(pageHelpString);
  28. if (pageHelpString)
  29. {
  30. helpString = pageHelpString;
  31. }
  32. }
  33. }
  34. CYSWizardPage::~CYSWizardPage()
  35. {
  36. LOG_DTOR(CYSWizardPage);
  37. }
  38. bool
  39. CYSWizardPage::OnWizNext()
  40. {
  41. LOG_FUNCTION(CYSWizardPage::OnWizNext);
  42. GetWizard().SetNextPageID(hwnd, Validate());
  43. return true;
  44. }
  45. /* NTRAID#NTBUG9-337325-2001/03/15-jeffjon,
  46. The cancel confirmation has been removed
  47. due to negative user feedback.
  48. */
  49. bool
  50. CYSWizardPage::OnQueryCancel()
  51. {
  52. LOG_FUNCTION(CYSWizardPage::OnQueryCancel);
  53. bool result = false;
  54. // set the rerun state to false so the wizard doesn't
  55. // just restart itself
  56. State::GetInstance().SetRerunWizard(false);
  57. Win::SetWindowLongPtr(
  58. hwnd,
  59. DWLP_MSGRESULT,
  60. result ? TRUE : FALSE);
  61. return true;
  62. }
  63. bool
  64. CYSWizardPage::OnHelp()
  65. {
  66. LOG_FUNCTION(CYSWizardPage::OnHelp);
  67. Win::HtmlHelp(
  68. hwnd,
  69. GetHelpString(),
  70. HH_DISPLAY_TOPIC,
  71. 0);
  72. return true;
  73. }