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.

78 lines
1.3 KiB

  1. // Copyright (c) 1997-2001 Microsoft Corporation
  2. //
  3. // File: PrintServerPage.cpp
  4. //
  5. // Synopsis: Defines the Printer page of the CYS wizard
  6. //
  7. // History: 02/08/2001 JeffJon Created
  8. #include "pch.h"
  9. #include "resource.h"
  10. #include "InstallationUnitProvider.h"
  11. #include "PrintServerPage.h"
  12. #include "state.h"
  13. static PCWSTR PRINTSERVER_PAGE_HELP = L"cys.chm::/cys_configuring_print_server.htm";
  14. PrintServerPage::PrintServerPage()
  15. :
  16. CYSWizardPage(
  17. IDD_PRINT_SERVER_PAGE,
  18. IDS_PRINT_SERVER_TITLE,
  19. IDS_PRINT_SERVER_SUBTITLE,
  20. PRINTSERVER_PAGE_HELP)
  21. {
  22. LOG_CTOR(PrintServerPage);
  23. }
  24. PrintServerPage::~PrintServerPage()
  25. {
  26. LOG_DTOR(PrintServerPage);
  27. }
  28. void
  29. PrintServerPage::OnInit()
  30. {
  31. LOG_FUNCTION(PrintServerPage::OnInit);
  32. Win::Button_SetCheck(GetDlgItem(hwnd, IDC_W2K_RADIO), BST_CHECKED);
  33. }
  34. bool
  35. PrintServerPage::OnSetActive()
  36. {
  37. LOG_FUNCTION(PrintServerPage::OnSetActive);
  38. Win::PropSheet_SetWizButtons(
  39. Win::GetParent(hwnd),
  40. PSWIZB_NEXT | PSWIZB_BACK);
  41. return true;
  42. }
  43. int
  44. PrintServerPage::Validate()
  45. {
  46. LOG_FUNCTION(PrintServerPage::Validate);
  47. int nextPage = -1;
  48. InstallationUnitProvider::GetInstance().GetPrintInstallationUnit().SetClients(
  49. Win::Button_GetCheck(Win::GetDlgItem(hwnd, IDC_ALL_RADIO)));
  50. nextPage = IDD_FINISH_PAGE;
  51. return nextPage;
  52. }