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.

135 lines
3.0 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1994 - 1996.
  5. //
  6. // File: welcome.cxx
  7. //
  8. // Contents: Task wizard welcome (initial) property page implementation.
  9. //
  10. // Classes: CWelcomePage
  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: CWelcomePage::CWelcomePage
  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. CWelcomePage::CWelcomePage(
  32. CTaskWizard *pParent,
  33. LPTSTR ptszFolderPath,
  34. HPROPSHEETPAGE *phPSP):
  35. CWizPage(MAKEINTRESOURCE(IDD_WELCOME), ptszFolderPath)
  36. {
  37. TRACE_CONSTRUCTOR(CWelcomePage);
  38. #ifdef WIZARD97
  39. m_psp.dwFlags |= PSP_HIDEHEADER;
  40. #endif // WIZARD97
  41. *phPSP = CreatePropertySheetPage(&m_psp);
  42. if (!*phPSP)
  43. {
  44. DEBUG_OUT_LASTERROR;
  45. }
  46. }
  47. //+--------------------------------------------------------------------------
  48. //
  49. // Member: CWelcomePage::~CWelcomePage
  50. //
  51. // Synopsis: dtor
  52. //
  53. // History: 4-28-1997 DavidMun Created
  54. //
  55. //---------------------------------------------------------------------------
  56. CWelcomePage::~CWelcomePage()
  57. {
  58. TRACE_DESTRUCTOR(CWelcomePage);
  59. }
  60. //===========================================================================
  61. //
  62. // CWizPage overrides
  63. //
  64. //===========================================================================
  65. //+--------------------------------------------------------------------------
  66. //
  67. // Member: CWelcomePage::_OnInitDialog
  68. //
  69. // Synopsis: Perform initialization that should only occur once.
  70. //
  71. // Arguments: [lParam] - LPPROPSHEETPAGE used to create this page
  72. //
  73. // Returns: TRUE (let windows set focus)
  74. //
  75. // History: 5-20-1997 DavidMun Created
  76. //
  77. //---------------------------------------------------------------------------
  78. LRESULT
  79. CWelcomePage::_OnInitDialog(
  80. LPARAM lParam)
  81. {
  82. TCHAR tszCaption[MAX_TITLE_CCH];
  83. LoadStr(IDS_CAPTION, tszCaption, ARRAYLEN(tszCaption));
  84. VERIFY(SetWindowText(GetParent(Hwnd()), tszCaption));
  85. return TRUE;
  86. }
  87. //+--------------------------------------------------------------------------
  88. //
  89. // Member: CWelcomePage::_OnPSNSetActive
  90. //
  91. // Synopsis: Disable the back button, since this is the first page.
  92. //
  93. // History: 5-20-1997 DavidMun Created
  94. //
  95. //---------------------------------------------------------------------------
  96. LRESULT
  97. CWelcomePage::_OnPSNSetActive(
  98. LPARAM lParam)
  99. {
  100. _SetWizButtons(PSWIZB_NEXT);
  101. return CPropPage::_OnPSNSetActive(lParam);
  102. }