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.

150 lines
3.7 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1994 - 1996.
  5. //
  6. // File: welcome.cxx
  7. //
  8. // Contents: Task wizard welcome (initial) property page implementation.
  9. //
  10. // Classes: CWelcomePage
  11. //
  12. // History: 11-21-1997 SusiA
  13. //
  14. //---------------------------------------------------------------------------
  15. #include "precomp.h"
  16. CWelcomePage *g_pWelcomePage = NULL;
  17. //+-------------------------------------------------------------------------------
  18. // FUNCTION: SchedWizardWelcomeDlgProc(HWND, UINT, WPARAM, LPARAM)
  19. //
  20. // PURPOSE: Callback dialog procedure for the property page
  21. //
  22. // PARAMETERS:
  23. // hDlg - Dialog box window handle
  24. // uMessage - current message
  25. // wParam - depends on message
  26. // lParam - depends on message
  27. //
  28. // RETURN VALUE:
  29. //
  30. // Depends on message. In general, return TRUE if we process it.
  31. //
  32. // COMMENTS:
  33. //
  34. //+-------------------------------------------------------------------------------
  35. INT_PTR CALLBACK SchedWizardWelcomeDlgProc(HWND hDlg, UINT uMessage, WPARAM wParam, LPARAM lParam)
  36. {
  37. switch (uMessage)
  38. {
  39. case WM_INITDIALOG:
  40. {
  41. //This handles the 256 color processing init
  42. //for the .bmp
  43. InitPage(hDlg,lParam);
  44. }
  45. break;
  46. case WM_PAINT:
  47. WmPaint(hDlg, uMessage, wParam, lParam);
  48. break;
  49. case WM_PALETTECHANGED:
  50. WmPaletteChanged(hDlg, wParam);
  51. break;
  52. case WM_QUERYNEWPALETTE:
  53. return( WmQueryNewPalette(hDlg) );
  54. break;
  55. case WM_ACTIVATE:
  56. return( WmActivate(hDlg, wParam, lParam) );
  57. break;
  58. case WM_DESTROY:
  59. {
  60. Unload256ColorBitmap();
  61. }
  62. break;
  63. case WM_NOTIFY:
  64. switch (((NMHDR FAR *) lParam)->code)
  65. {
  66. case PSN_KILLACTIVE:
  67. SetWindowLongPtr(hDlg, DWLP_MSGRESULT, FALSE);
  68. return 1;
  69. break;
  70. case PSN_RESET:
  71. // reset to the original values
  72. SetWindowLongPtr(hDlg, DWLP_MSGRESULT, FALSE);
  73. break;
  74. case PSN_SETACTIVE:
  75. PropSheet_SetWizButtons(GetParent(hDlg), PSWIZB_NEXT);
  76. break;
  77. case PSN_WIZNEXT:
  78. break;
  79. default:
  80. return FALSE;
  81. }
  82. break;
  83. default:
  84. return FALSE;
  85. }
  86. return TRUE;
  87. }
  88. //+--------------------------------------------------------------------------
  89. //
  90. // Member: CWelcomePage::CWelcomePage
  91. //
  92. // Synopsis: ctor
  93. //
  94. // [phPSP] - filled with prop page handle
  95. //
  96. // History: 11-21-1997 SusiA Stole from Task Scheduler wizard
  97. //
  98. //---------------------------------------------------------------------------
  99. CWelcomePage::CWelcomePage(
  100. HINSTANCE hinst,
  101. ISyncSchedule *pISyncSched,
  102. HPROPSHEETPAGE *phPSP)
  103. {
  104. ZeroMemory(&m_psp, sizeof(m_psp));
  105. g_pWelcomePage = this;
  106. m_psp.dwSize = sizeof (PROPSHEETPAGE);
  107. m_psp.dwFlags = PSH_DEFAULT;
  108. m_psp.hInstance = hinst;
  109. m_psp.pszTemplate = MAKEINTRESOURCE(IDD_SCHEDWIZ_INTRO);
  110. m_psp.pszIcon = NULL;
  111. m_psp.pfnDlgProc = SchedWizardWelcomeDlgProc;
  112. m_psp.lParam = 0;
  113. m_pISyncSched = pISyncSched;
  114. m_pISyncSched->AddRef();
  115. *phPSP = CreatePropertySheetPage(&m_psp);
  116. }