home *** CD-ROM | disk | FTP | other *** search
- // CalTypes.cpp : implementation file
- //
-
- #include "stdafx.h"
- #include "allctls.h"
- #include "CalTypes.h"
- #include "FYrCal.h"
- #include "6MonCal.h"
- #include "3MonCal.h"
- #include "3VMonCal.h"
- #include "1MonCal.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CCalTypes dialog
-
-
- CCalTypes::CCalTypes(CWnd* pParent /*=NULL*/)
- : CDialog(CCalTypes::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CCalTypes)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
-
-
- void CCalTypes::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CCalTypes)
- // NOTE: the ClassWizard will add DDX and DDV calls here
- //}}AFX_DATA_MAP
- }
-
-
- BEGIN_MESSAGE_MAP(CCalTypes, CDialog)
- //{{AFX_MSG_MAP(CCalTypes)
- // NOTE: the ClassWizard will add message map macros here
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CCalTypes message handlers
-
- BEGIN_EVENTSINK_MAP(CCalTypes, CDialog)
- //{{AFX_EVENTSINK_MAP(CCalTypes)
- ON_EVENT(CCalTypes, IDC_SHOWCALENDAR, -600 /* Click */, OnClickShowcalendar, VTS_NONE)
- //}}AFX_EVENTSINK_MAP
- END_EVENTSINK_MAP()
-
- void CCalTypes::OnClickShowcalendar()
- {
- // TODO: Add your control notification handler code here
- if (((CButton*)GetDlgItem(IDC_FULLYEAR))->GetCheck())
- {
- CFullYearCal dlg;
-
- dlg.DoModal();
- }
- else
- if (((CButton*)GetDlgItem(IDC_SIXMONTHS))->GetCheck())
- {
- CSixMonthCal dlg;
-
- dlg.DoModal();
- }
- else
- if (((CButton*)GetDlgItem(IDC_H3MONTHS))->GetCheck())
- {
- C3MonthCal dlg;
-
- dlg.DoModal();
- }
- else
- if (((CButton*)GetDlgItem(IDC_V3MONTHS))->GetCheck())
- {
- C3VMonthCal dlg;
-
- dlg.DoModal();
- }
- else
- {
- COneMonthCal dlg;
-
- dlg.DoModal();
- }
- }
-