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.

81 lines
2.4 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997-2002.
  5. //
  6. // File: Wiz97Sht.cpp
  7. //
  8. // Contents: Base class for cert find dialog
  9. //
  10. //----------------------------------------------------------------------------\
  11. //////////////////////////////////////////////////////////////////////
  12. #include "stdafx.h"
  13. #include "Wiz97Sht.h"
  14. #include "Wiz97PPg.h"
  15. //////////////////////////////////////////////////////////////////////
  16. // Construction/Destruction
  17. //////////////////////////////////////////////////////////////////////
  18. CWizard97PropertySheet::CWizard97PropertySheet(UINT nIDCaption, UINT nIDWaterMark, UINT nIDBanner)
  19. {
  20. // security review 2/27/2002 BryanWal ok
  21. ::ZeroMemory (&m_pPagePtr, sizeof (m_pPagePtr));
  22. ::ZeroMemory (&m_pPageArr, sizeof (m_pPageArr));
  23. // NOTICE: do this because of header mismatch
  24. // security review 2/27/2002 BryanWal ok
  25. ::ZeroMemory (&m_psh, sizeof(m_psh));
  26. m_psh.dwFlags = PSH_WIZARD | PSH_WIZARD97 | PSH_WATERMARK | PSH_HEADER;
  27. m_psh.pszbmWatermark = MAKEINTRESOURCE (nIDWaterMark);
  28. m_psh.pszbmHeader = MAKEINTRESOURCE (nIDBanner);
  29. m_psh.hplWatermark = NULL;
  30. m_psh.dwSize = sizeof (m_psh);
  31. m_psh.hInstance = AfxGetApp()->m_hInstance;
  32. m_psh.hwndParent = NULL;
  33. VERIFY (m_title.LoadString (nIDCaption));
  34. m_psh.pszCaption = (LPCWSTR) m_title;
  35. m_psh.phpage = NULL;
  36. m_psh.nStartPage = 0;
  37. m_psh.nPages = 0;
  38. m_nPageCount = 0;
  39. }
  40. CWizard97PropertySheet::~CWizard97PropertySheet()
  41. {
  42. }
  43. INT_PTR CWizard97PropertySheet::DoWizard(HWND hParent)
  44. {
  45. m_psh.hwndParent = hParent;
  46. // if ( m_nPageCount > 0 && m_pPagePtr[m_nPageCount - 1] )
  47. // m_pPagePtr[m_nPageCount - 1]->m_bLast = TRUE;
  48. m_psh.phpage = m_pPageArr;
  49. m_psh.nStartPage = 0;
  50. m_psh.nPages = m_nPageCount;
  51. return PropertySheet (&m_psh);
  52. }
  53. void CWizard97PropertySheet::AddPage(CWizard97PropertyPage * pPage)
  54. {
  55. ASSERT (pPage);
  56. if ( pPage )
  57. {
  58. ASSERT (m_nPageCount < NUM_PAGES);
  59. m_pPagePtr[m_nPageCount] = pPage;
  60. m_pPageArr[m_nPageCount] = ::MyCreatePropertySheetPage (
  61. (AFX_OLDPROPSHEETPAGE*) &(pPage->m_psp97));
  62. ASSERT (m_pPageArr[m_nPageCount]);
  63. m_nPageCount++;
  64. pPage->m_pWiz = this;
  65. }
  66. }