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.

72 lines
1.4 KiB

  1. // Copyright (c) 1997-2001 Microsoft Corporation
  2. //
  3. // File: ClusterPage.cpp
  4. //
  5. // Synopsis: Defines the Cluster Page for the CYS
  6. // wizard. This page lets the user choose
  7. // between a new cluster or existing cluster
  8. //
  9. // History: 03/19/2001 JeffJon Created
  10. #include "pch.h"
  11. #include "resource.h"
  12. #include "InstallationUnitProvider.h"
  13. #include "ClusterPage.h"
  14. #include "state.h"
  15. static PCWSTR CLUSTER_PAGE_HELP = L"cys.chm::/configuring_cluster_server.htm";
  16. ClusterPage::ClusterPage()
  17. :
  18. CYSWizardPage(
  19. IDD_CLUSTER_SERVER_PAGE,
  20. IDS_CLUSTER_TITLE,
  21. IDS_CLUSTER_SUBTITLE,
  22. CLUSTER_PAGE_HELP)
  23. {
  24. LOG_CTOR(ClusterPage);
  25. }
  26. ClusterPage::~ClusterPage()
  27. {
  28. LOG_DTOR(ClusterPage);
  29. }
  30. void
  31. ClusterPage::OnInit()
  32. {
  33. LOG_FUNCTION(ClusterPage::OnInit);
  34. Win::Button_SetCheck(Win::GetDlgItem(hwnd, IDC_YES_RADIO), BST_CHECKED);
  35. }
  36. bool
  37. ClusterPage::OnSetActive()
  38. {
  39. LOG_FUNCTION(ClusterPage::OnSetActive);
  40. Win::PropSheet_SetWizButtons(
  41. Win::GetParent(hwnd),
  42. PSWIZB_NEXT | PSWIZB_BACK);
  43. return true;
  44. }
  45. int
  46. ClusterPage::Validate()
  47. {
  48. LOG_FUNCTION(ClusterPage::Validate);
  49. bool newCluster =
  50. Win::Button_GetCheck(Win::GetDlgItem(hwnd, IDC_YES_RADIO)) == BST_CHECKED;
  51. InstallationUnitProvider::GetInstance().GetClusterInstallationUnit().SetNewCluster(newCluster);
  52. return IDD_FINISH_PAGE;
  53. }