IntroPg.cpp 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. // IntroPg.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 "IntroPg.h"
  15. #ifdef _DEBUG
  16. #define new DEBUG_NEW
  17. #undef THIS_FILE
  18. static char THIS_FILE[] = __FILE__;
  19. #endif
  20. /////////////////////////////////////////////////////////////////////////////
  21. // CIntroPage property page
  22. IMPLEMENT_DYNCREATE(CIntroPage, CResizablePageEx)
  23. CIntroPage::CIntroPage() : CResizablePageEx(CIntroPage::IDD)
  24. {
  25. //{{AFX_DATA_INIT(CIntroPage)
  26. // NOTE: the ClassWizard will add member initialization here
  27. //}}AFX_DATA_INIT
  28. m_psp.dwFlags |= PSP_HIDEHEADER;
  29. }
  30. CIntroPage::~CIntroPage()
  31. {
  32. }
  33. void CIntroPage::DoDataExchange(CDataExchange* pDX)
  34. {
  35. CResizablePageEx::DoDataExchange(pDX);
  36. //{{AFX_DATA_MAP(CIntroPage)
  37. // NOTE: the ClassWizard will add DDX and DDV calls here
  38. //}}AFX_DATA_MAP
  39. }
  40. BEGIN_MESSAGE_MAP(CIntroPage, CResizablePageEx)
  41. //{{AFX_MSG_MAP(CIntroPage)
  42. //}}AFX_MSG_MAP
  43. END_MESSAGE_MAP()
  44. /////////////////////////////////////////////////////////////////////////////
  45. // CIntroPage message handlers
  46. BOOL CIntroPage::OnSetActive()
  47. {
  48. CPropertySheet* pSheet = (CPropertySheet*)GetParent();
  49. ASSERT_KINDOF(CPropertySheet, pSheet);
  50. pSheet->SetWizardButtons(PSWIZB_NEXT);
  51. return CResizablePageEx::OnSetActive();
  52. }
  53. BOOL CIntroPage::OnInitDialog()
  54. {
  55. CResizablePageEx::OnInitDialog();
  56. AddAnchor(IDC_BOLDTITLE, TOP_LEFT);
  57. AddAnchor(IDC_BIGBOLDTITLE, TOP_LEFT);
  58. AddAnchor(IDC_TRANSPARENT1, TOP_LEFT, MIDDLE_RIGHT);
  59. AddAnchor(IDC_TRANSPARENT2, MIDDLE_LEFT, BOTTOM_RIGHT);
  60. AddAnchor(IDC_TRANSPARENT3, BOTTOM_LEFT);
  61. AddAnchor(IDC_EDIT1, BOTTOM_LEFT, BOTTOM_RIGHT);
  62. LOGFONT lf;
  63. GetDlgItem(IDC_BOLDTITLE)->GetFont()->GetLogFont(&lf);
  64. lf.lfWeight = FW_BOLD;
  65. m_fontTitle.CreateFontIndirect(&lf);
  66. GetDlgItem(IDC_BOLDTITLE)->SetFont(&m_fontTitle);
  67. lf.lfWeight = FW_BOLD;
  68. lf.lfHeight *= 2;
  69. m_fontBig.CreateFontIndirect(&lf);
  70. GetDlgItem(IDC_BIGBOLDTITLE)->SetFont(&m_fontBig);
  71. return TRUE; // return TRUE unless you set the focus to a control
  72. }