home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2003 June
/
PCWorld_2003-06_cd.bin
/
KOMUNIK
/
MIRRORIT
/
SRC
/
SESSIONPROPERTIESADVANCEDPA.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1998-01-05
|
3KB
|
107 lines
// SessionPropertiesAdvancedPage.cpp : implementation file
//
#include "stdafx.h"
#include "MirrorIt.h"
#include "SessionPropertiesAdvancedPage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSessionPropertiesAdvancedPage property page
IMPLEMENT_DYNCREATE(CSessionPropertiesAdvancedPage, CPropertyPage)
CSessionPropertiesAdvancedPage::CSessionPropertiesAdvancedPage() : CPropertyPage(CSessionPropertiesAdvancedPage::IDD)
{
//{{AFX_DATA_INIT(CSessionPropertiesAdvancedPage)
m_BDate = FALSE;
m_Exclude = _T("");
m_Multiple = FALSE;
m_Permanent = FALSE;
m_Temporary = FALSE;
//}}AFX_DATA_INIT
}
CSessionPropertiesAdvancedPage::~CSessionPropertiesAdvancedPage()
{
}
void CSessionPropertiesAdvancedPage::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSessionPropertiesAdvancedPage)
DDX_Check(pDX, IDC_BDATE, m_BDate);
DDX_Text(pDX, IDC_EXCLUDE, m_Exclude);
DDX_Check(pDX, IDC_MULTIPLE, m_Multiple);
DDX_Check(pDX, IDC_PERMANENT, m_Permanent);
DDX_Check(pDX, IDC_TEMPORARY, m_Temporary);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSessionPropertiesAdvancedPage, CPropertyPage)
//{{AFX_MSG_MAP(CSessionPropertiesAdvancedPage)
ON_BN_CLICKED(IDC_BDATE, OnBdate)
ON_WM_DESTROY()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSessionPropertiesAdvancedPage message handlers
BOOL CSessionPropertiesAdvancedPage::OnInitDialog()
{
CPropertyPage::OnInitDialog();
// TODO: Add extra initialization here
RECT rc;
CWnd *pFrame = GetDlgItem(IDC_FRAME);
pFrame -> GetClientRect(&rc);
m_Date.Create(WS_CHILD | WS_VISIBLE | WS_TABSTOP | DTS_LONGDATEFORMAT,
rc, pFrame, IDC_DATE);
pFrame = GetDlgItem(IDC_FRAME2);
pFrame -> GetClientRect(&rc);
m_Time.Create(WS_CHILD | WS_VISIBLE | WS_TABSTOP | DTS_TIMEFORMAT,
rc, pFrame, IDC_TIME);
SetDate(m_BDate);
m_Date.SetDateTime(m_DateTime);
m_Time.SetDateTime(m_DateTime);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CSessionPropertiesAdvancedPage::SetDate(BOOL b)
{
m_Date.EnableWindow(b);
m_Time.EnableWindow(b);
}
void CSessionPropertiesAdvancedPage::OnBdate()
{
SetDate(((CButton *)GetDlgItem(IDC_BDATE)) -> GetCheck() ? TRUE : FALSE);
}
void CSessionPropertiesAdvancedPage::OnDestroy()
{
CPropertyPage::OnDestroy();
SYSTEMTIME t1, t2;
m_Date.GetDateTime(t1);
m_Time.GetDateTime(t2);
m_DateTime.wYear = t1.wYear;
m_DateTime.wMonth = t1.wMonth;
m_DateTime.wDay = t1.wDay;
m_DateTime.wHour = t2.wHour;
m_DateTime.wMinute = t2.wMinute;
m_DateTime.wSecond = t2.wSecond;
}