home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / protview / demowinx / data.1 / CALTYPES.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-17  |  1.9 KB  |  93 lines

  1. // CalTypes.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "allctls.h"
  6. #include "CalTypes.h"
  7. #include "FYrCal.h"
  8. #include "6MonCal.h"
  9. #include "3MonCal.h"
  10. #include "3VMonCal.h"
  11. #include "1MonCal.h"
  12.  
  13. #ifdef _DEBUG
  14. #define new DEBUG_NEW
  15. #undef THIS_FILE
  16. static char THIS_FILE[] = __FILE__;
  17. #endif
  18.  
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CCalTypes dialog
  21.  
  22.  
  23. CCalTypes::CCalTypes(CWnd* pParent /*=NULL*/)
  24.     : CDialog(CCalTypes::IDD, pParent)
  25. {
  26.     //{{AFX_DATA_INIT(CCalTypes)
  27.         // NOTE: the ClassWizard will add member initialization here
  28.     //}}AFX_DATA_INIT
  29. }
  30.  
  31.  
  32. void CCalTypes::DoDataExchange(CDataExchange* pDX)
  33. {
  34.     CDialog::DoDataExchange(pDX);
  35.     //{{AFX_DATA_MAP(CCalTypes)
  36.         // NOTE: the ClassWizard will add DDX and DDV calls here
  37.     //}}AFX_DATA_MAP
  38. }
  39.  
  40.  
  41. BEGIN_MESSAGE_MAP(CCalTypes, CDialog)
  42.     //{{AFX_MSG_MAP(CCalTypes)
  43.         // NOTE: the ClassWizard will add message map macros here
  44.     //}}AFX_MSG_MAP
  45. END_MESSAGE_MAP()
  46.  
  47. /////////////////////////////////////////////////////////////////////////////
  48. // CCalTypes message handlers
  49.  
  50. BEGIN_EVENTSINK_MAP(CCalTypes, CDialog)
  51.     //{{AFX_EVENTSINK_MAP(CCalTypes)
  52.     ON_EVENT(CCalTypes, IDC_SHOWCALENDAR, -600 /* Click */, OnClickShowcalendar, VTS_NONE)
  53.     //}}AFX_EVENTSINK_MAP
  54. END_EVENTSINK_MAP()
  55.  
  56. void CCalTypes::OnClickShowcalendar() 
  57. {
  58.     // TODO: Add your control notification handler code here
  59.     if (((CButton*)GetDlgItem(IDC_FULLYEAR))->GetCheck())
  60.     {
  61.         CFullYearCal dlg;
  62.  
  63.         dlg.DoModal();
  64.     }
  65.     else
  66.     if (((CButton*)GetDlgItem(IDC_SIXMONTHS))->GetCheck())
  67.     {
  68.         CSixMonthCal dlg;
  69.  
  70.         dlg.DoModal();
  71.     }
  72.     else
  73.     if (((CButton*)GetDlgItem(IDC_H3MONTHS))->GetCheck())
  74.     {
  75.         C3MonthCal dlg;
  76.  
  77.         dlg.DoModal();
  78.     }
  79.     else
  80.     if (((CButton*)GetDlgItem(IDC_V3MONTHS))->GetCheck())
  81.     {
  82.         C3VMonthCal dlg;
  83.  
  84.         dlg.DoModal();
  85.     }
  86.     else
  87.     {
  88.         COneMonthCal dlg;
  89.  
  90.         dlg.DoModal();
  91.     }
  92. }
  93.