home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / general / snapvw / dinnerpg.cpp < prev    next >
C/C++ Source or Header  |  1998-03-26  |  2KB  |  77 lines

  1. // DinnerPg.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.  
  13. #include "stdafx.h"
  14. #include "snapvw.h"
  15. #include "DinnerPg.h"
  16.  
  17. #ifdef _DEBUG
  18. #define new DEBUG_NEW
  19. #undef THIS_FILE
  20. static char THIS_FILE[] = __FILE__;
  21. #endif
  22.  
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CDinnerPage property page
  25.  
  26. IMPLEMENT_DYNCREATE(CDinnerPage, CPropertyPage)
  27.  
  28. CDinnerPage::CDinnerPage() : CPropertyPage(CDinnerPage::IDD)
  29. {
  30.     //{{AFX_DATA_INIT(CDinnerPage)
  31.         // NOTE: the ClassWizard will add member initialization here
  32.     //}}AFX_DATA_INIT
  33. }
  34.  
  35. CDinnerPage::~CDinnerPage()
  36. {
  37. }
  38.  
  39. void CDinnerPage::DoDataExchange(CDataExchange* pDX)
  40. {
  41.     CPropertyPage::DoDataExchange(pDX);
  42.     //{{AFX_DATA_MAP(CDinnerPage)
  43.         // NOTE: the ClassWizard will add DDX and DDV calls here
  44.     //}}AFX_DATA_MAP
  45. }
  46.  
  47.  
  48. BEGIN_MESSAGE_MAP(CDinnerPage, CPropertyPage)
  49.     //{{AFX_MSG_MAP(CDinnerPage)
  50.     //}}AFX_MSG_MAP
  51. END_MESSAGE_MAP()
  52.  
  53. /////////////////////////////////////////////////////////////////////////////
  54. // CDinnerPage message handlers
  55.  
  56. BOOL CDinnerPage::OnInitDialog()
  57. {
  58.     CPropertyPage::OnInitDialog();
  59.  
  60.     // TODO: Add extra initialization here
  61.  
  62.     CButton* pBevButton;
  63.     pBevButton = (CButton*) GetDlgItem(IDC_COFFEE1);
  64.     pBevButton->SetCheck(1);
  65.  
  66.     CButton* pFoodButton;
  67.     pFoodButton = (CButton*) GetDlgItem(IDC_ROMANTIC);
  68.     pFoodButton->SetCheck(1);
  69.  
  70.     CButton* pCompButton;
  71.     pCompButton = (CButton*) GetDlgItem(IDC_NEIGHBOR);
  72.     pCompButton->SetCheck(1);
  73.  
  74.     return TRUE;  // return TRUE unless you set the focus to a control
  75.                   // EXCEPTION: OCX Property Pages should return FALSE
  76. }
  77.