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.

139 lines
3.9 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Copyright (c) 1997-1999 Microsoft Corporation
  4. // All rights reserved.
  5. //
  6. // File Name:
  7. // advance.c
  8. //
  9. // Description:
  10. // This file contains the dlgproc for the IDD_ADVANCED1 page. It
  11. // is a flow page that controls whether to show the user a whole
  12. // bunch more pages or not.
  13. //
  14. //----------------------------------------------------------------------------
  15. #include "pch.h"
  16. #include "resource.h"
  17. //----------------------------------------------------------------------------
  18. //
  19. // Function: OnSetActiveAdvance
  20. //
  21. // Purpose: Called at SETACTIVE time. Init controls.
  22. //
  23. //----------------------------------------------------------------------------
  24. VOID OnSetActiveAdvance(HWND hwnd)
  25. {
  26. CheckRadioButton(hwnd,
  27. IDC_ADVANCEDYES,
  28. IDC_ADVANCEDNO,
  29. WizGlobals.bDoAdvancedPages ? IDC_ADVANCEDYES
  30. : IDC_ADVANCEDNO);
  31. PropSheet_SetWizButtons(GetParent(hwnd), PSWIZB_BACK | PSWIZB_NEXT);
  32. }
  33. //----------------------------------------------------------------------------
  34. //
  35. // Function: OnRadioButtonAdvance
  36. //
  37. // Purpose: Called when one of the radio buttons is pushed.
  38. //
  39. //----------------------------------------------------------------------------
  40. VOID OnRadioButtonAdvance(HWND hwnd, int nButtonId)
  41. {
  42. CheckRadioButton(hwnd,
  43. IDC_ADVANCEDYES,
  44. IDC_ADVANCEDNO,
  45. nButtonId);
  46. }
  47. //----------------------------------------------------------------------------
  48. //
  49. // Function: OnWizNextAdvance
  50. //
  51. // Purpose: Called when NEXT button is pushed.
  52. //
  53. //----------------------------------------------------------------------------
  54. VOID OnWizNextAdvance(HWND hwnd)
  55. {
  56. WizGlobals.bDoAdvancedPages = IsDlgButtonChecked(hwnd, IDC_ADVANCEDYES);
  57. }
  58. //----------------------------------------------------------------------------
  59. //
  60. // Function: DlgAdvanced1Page
  61. //
  62. // Purpose: This is the dialog procedure the IDD_ADVANCED1 page. It simply
  63. // asks if the user wants to deal with advanced features or not.
  64. //
  65. //----------------------------------------------------------------------------
  66. INT_PTR CALLBACK DlgAdvanced1Page(
  67. IN HWND hwnd,
  68. IN UINT uMsg,
  69. IN WPARAM wParam,
  70. IN LPARAM lParam)
  71. {
  72. BOOL bStatus = TRUE;
  73. switch (uMsg) {
  74. case WM_COMMAND:
  75. {
  76. int nButtonId;
  77. switch ( nButtonId = LOWORD(wParam) ) {
  78. case IDC_ADVANCEDYES:
  79. case IDC_ADVANCEDNO:
  80. if ( HIWORD(wParam) == BN_CLICKED )
  81. OnRadioButtonAdvance(hwnd, LOWORD(wParam));
  82. break;
  83. default:
  84. bStatus = FALSE;
  85. break;
  86. }
  87. }
  88. break;
  89. case WM_NOTIFY:
  90. {
  91. LPNMHDR pnmh = (LPNMHDR)lParam;
  92. switch( pnmh->code ) {
  93. case PSN_QUERYCANCEL:
  94. CancelTheWizard(hwnd);
  95. break;
  96. case PSN_SETACTIVE:
  97. OnSetActiveAdvance(hwnd);
  98. break;
  99. case PSN_WIZBACK:
  100. break;
  101. case PSN_WIZNEXT:
  102. OnWizNextAdvance(hwnd);
  103. break;
  104. default:
  105. bStatus = FALSE;
  106. break;
  107. }
  108. }
  109. break;
  110. default:
  111. bStatus = FALSE;
  112. break;
  113. }
  114. return bStatus;
  115. }