WizSheet.cpp 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. // SampWizP.cpp : implementation file
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12. #include "stdafx.h"
  13. #include "Wizard97.h"
  14. #include "WizSheet.h"
  15. #ifdef _DEBUG
  16. #define new DEBUG_NEW
  17. #undef THIS_FILE
  18. static char THIS_FILE[] = __FILE__;
  19. #endif
  20. /////////////////////////////////////////////////////////////////////////////
  21. // CWizard97Sheet
  22. IMPLEMENT_DYNAMIC(CWizard97Sheet, CResizableSheetEx)
  23. CWizard97Sheet::CWizard97Sheet(BOOL bOldStyle)
  24. {
  25. if (bOldStyle)
  26. {
  27. VERIFY(m_bmpWatermark.LoadBitmap(IDB_WATERMARK_OLD));
  28. VERIFY(m_bmpHeader.LoadBitmap(IDB_BANNER_OLD));
  29. }
  30. else
  31. {
  32. VERIFY(m_bmpWatermark.LoadBitmap(IDB_WATERMARK_NEW));
  33. VERIFY(m_bmpHeader.LoadBitmap(IDB_BANNER_NEW));
  34. }
  35. Construct(IDS_SAMPLEWIZARD, NULL, 0, m_bmpWatermark, NULL, m_bmpHeader);
  36. // add all the pages of the wizard
  37. if (bOldStyle)
  38. AddPage(&m_Intro);
  39. else
  40. AddPage(&m_IntroNew);
  41. AddPage(&m_Interior1);
  42. AddPage(&m_Interior2);
  43. if (bOldStyle)
  44. AddPage(&m_Completion);
  45. else
  46. AddPage(&m_CompletionNew);
  47. // use the right flag for Wizard97 style
  48. m_psh.dwFlags |= bOldStyle ? PSH_IE4WIZARD97|PSH_STRETCHWATERMARK : PSH_IE5WIZARD97;
  49. }
  50. CWizard97Sheet::~CWizard97Sheet()
  51. {
  52. }
  53. BEGIN_MESSAGE_MAP(CWizard97Sheet, CResizableSheetEx)
  54. //{{AFX_MSG_MAP(CWizard97Sheet)
  55. //}}AFX_MSG_MAP
  56. END_MESSAGE_MAP()
  57. /////////////////////////////////////////////////////////////////////////////
  58. // CWizard97Sheet message handlers
  59. BOOL CWizard97Sheet::OnInitDialog()
  60. {
  61. CResizableSheetEx::OnInitDialog();
  62. CRect rect;
  63. GetWindowRect(&rect);
  64. SetMinTrackSize(CSize(GetMinWidth(), rect.Height()));
  65. //EnableSaveRestore("Wizard97");
  66. return TRUE; // return TRUE unless you set the focus to a control
  67. // EXCEPTION: OCX Property Pages should return FALSE
  68. }