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 / lunchpg.cpp < prev    next >
C/C++ Source or Header  |  1998-03-26  |  2KB  |  77 lines

  1. // LunchPg.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 "LunchPg.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. // CLunchPage property page
  25.  
  26. IMPLEMENT_DYNCREATE(CLunchPage, CPropertyPage)
  27.  
  28. CLunchPage::CLunchPage() : CPropertyPage(CLunchPage::IDD)
  29. {
  30.     //{{AFX_DATA_INIT(CLunchPage)
  31.         // NOTE: the ClassWizard will add member initialization here
  32.     //}}AFX_DATA_INIT
  33. }
  34.  
  35. CLunchPage::~CLunchPage()
  36. {
  37. }
  38.  
  39. void CLunchPage::DoDataExchange(CDataExchange* pDX)
  40. {
  41.     CPropertyPage::DoDataExchange(pDX);
  42.     //{{AFX_DATA_MAP(CLunchPage)
  43.         // NOTE: the ClassWizard will add DDX and DDV calls here
  44.     //}}AFX_DATA_MAP
  45. }
  46.  
  47.  
  48. BEGIN_MESSAGE_MAP(CLunchPage, CPropertyPage)
  49.     //{{AFX_MSG_MAP(CLunchPage)
  50.     //}}AFX_MSG_MAP
  51. END_MESSAGE_MAP()
  52.  
  53. /////////////////////////////////////////////////////////////////////////////
  54. // CLunchPage message handlers
  55.  
  56. BOOL CLunchPage::OnInitDialog()
  57. {
  58.     CPropertyPage::OnInitDialog();
  59.  
  60.     CButton* pBevButton;
  61.     pBevButton = (CButton*) GetDlgItem(IDC_SODA);
  62.     pBevButton->SetCheck(1);
  63.  
  64.     CButton* pFoodButton;
  65.     pFoodButton = (CButton*) GetDlgItem(IDC_GREASY);
  66.     pFoodButton->SetCheck(1);
  67.  
  68.     CButton* pMagButton;
  69.     pMagButton = (CButton*) GetDlgItem(IDC_TABLOID);
  70.     pMagButton->SetCheck(1);
  71.  
  72.     // TODO: Add extra initialization here
  73.  
  74.     return TRUE;  // return TRUE unless you set the focus to a control
  75.                   // EXCEPTION: OCX Property Pages should return FALSE
  76. }
  77.