CompleteNew.cpp 2.3 KB

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