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.

84 lines
1.7 KiB

  1. // Copyright (c) 2001 Microsoft Corporation
  2. //
  3. // File: AdminPackOnlyPage.h
  4. //
  5. // Synopsis: Defines the AdminPackOnlypage that
  6. // asks the user if they want to install
  7. // the Admin Pack
  8. //
  9. // History: 06/01/2001 JeffJon Created
  10. #include "pch.h"
  11. #include "resource.h"
  12. #include "InstallationUnitProvider.h"
  13. #include "AdminPackOnlyPage.h"
  14. #include "state.h"
  15. static PCWSTR ADMIN_PACK_ONLY_PAGE_HELP = L"cys.chm::/cys_adminpack.htm";
  16. AdminPackOnlyPage::AdminPackOnlyPage()
  17. :
  18. CYSWizardPage(
  19. IDD_ADMIN_PACK_ONLY_PAGE,
  20. IDS_ADMIN_PACK_TITLE,
  21. IDS_ADMIN_PACK_SUBTITLE,
  22. ADMIN_PACK_ONLY_PAGE_HELP)
  23. {
  24. LOG_CTOR(AdminPackOnlyPage);
  25. }
  26. AdminPackOnlyPage::~AdminPackOnlyPage()
  27. {
  28. LOG_DTOR(AdminPackOnlyPage);
  29. }
  30. void
  31. AdminPackOnlyPage::OnInit()
  32. {
  33. LOG_FUNCTION(AdminPackOnlyPage::OnInit);
  34. Win::SetDlgItemText(
  35. hwnd,
  36. IDC_TOO_LONG_STATIC,
  37. String::load(IDS_ADMIN_PACK_PAGE_TEXT));
  38. }
  39. bool
  40. AdminPackOnlyPage::OnSetActive()
  41. {
  42. LOG_FUNCTION(AdminPackOnlyPage::OnSetActive);
  43. Win::PropSheet_SetWizButtons(
  44. Win::GetParent(hwnd),
  45. PSWIZB_NEXT | PSWIZB_BACK);
  46. return true;
  47. }
  48. int
  49. AdminPackOnlyPage::Validate()
  50. {
  51. LOG_FUNCTION(AdminPackOnlyPage::Validate);
  52. int nextPage = IDD_MILESTONE_PAGE;
  53. // Get the checkbox value to see if we should install
  54. // the Admin Pack
  55. InstallationUnitProvider::GetInstance().GetAdminPackInstallationUnit().SetInstallAdminPack(
  56. Win::Button_GetCheck(
  57. Win::GetDlgItem(
  58. hwnd,
  59. IDC_INSTALL_ADMINPACK_CHECK)));
  60. LOG(String::format(
  61. L"nextPage = %1!d!",
  62. nextPage));
  63. return nextPage;
  64. }