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.

83 lines
1.5 KiB

  1. // Copyright (c) 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. static PCWSTR PRINTSERVER_PAGE_HELP = L"cys.chm::/print_server_role.htm#printsrvprintersdrivers";
  13. PrintServerPage::PrintServerPage()
  14. :
  15. CYSWizardPage(
  16. IDD_PRINT_SERVER_PAGE,
  17. IDS_PRINT_SERVER_TITLE,
  18. IDS_PRINT_SERVER_SUBTITLE,
  19. PRINTSERVER_PAGE_HELP)
  20. {
  21. LOG_CTOR(PrintServerPage);
  22. }
  23. PrintServerPage::~PrintServerPage()
  24. {
  25. LOG_DTOR(PrintServerPage);
  26. }
  27. void
  28. PrintServerPage::OnInit()
  29. {
  30. LOG_FUNCTION(PrintServerPage::OnInit);
  31. CYSWizardPage::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_MILESTONE_PAGE;
  51. LOG(String::format(
  52. L"nextPage = %1!d!",
  53. nextPage));
  54. return nextPage;
  55. }