home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2003 June
/
PCWorld_2003-06_cd.bin
/
KOMUNIK
/
MIRRORIT
/
SRC
/
SESSIONPROPERTIESFILENAMEPA.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1998-01-04
|
3KB
|
109 lines
// SessionPropertiesFileNamePage.cpp : implementation file
//
#include "stdafx.h"
#include "MirrorIt.h"
#include "SessionPropertiesFileNamePage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSessionPropertiesFileNamePage property page
IMPLEMENT_DYNCREATE(CSessionPropertiesFileNamePage, CPropertyPage)
CSessionPropertiesFileNamePage::CSessionPropertiesFileNamePage() : CPropertyPage(CSessionPropertiesFileNamePage::IDD)
{
//{{AFX_DATA_INIT(CSessionPropertiesFileNamePage)
m_LongFileName = -1;
m_FullNames = FALSE;
//}}AFX_DATA_INIT
bold = NULL;
}
CSessionPropertiesFileNamePage::~CSessionPropertiesFileNamePage()
{
if (bold) delete bold;
}
void CSessionPropertiesFileNamePage::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSessionPropertiesFileNamePage)
DDX_Radio(pDX, IDC_831, m_LongFileName);
DDX_Check(pDX, IDC_FULLNAMES, m_FullNames);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSessionPropertiesFileNamePage, CPropertyPage)
//{{AFX_MSG_MAP(CSessionPropertiesFileNamePage)
ON_BN_CLICKED(IDC_FULLNAMES, OnFullnames)
ON_BN_CLICKED(IDC_831, On831)
ON_BN_CLICKED(IDC_832, On832)
ON_BN_CLICKED(IDC_833, On833)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSessionPropertiesFileNamePage message handlers
BOOL CSessionPropertiesFileNamePage::OnInitDialog()
{
CPropertyPage::OnInitDialog();
LOGFONT lf;
GetDlgItem(IDC_STATIC1) -> GetFont() -> GetLogFont(&lf);
lf.lfWeight = 700;
bold = new CFont;
bold -> CreateFontIndirect(&lf);
GetDlgItem(IDC_STATIC1) -> SetFont(bold);
GetDlgItem(IDC_STATIC2) -> SetFont(bold);
// TODO: Add extra initialization here
SetFullNames(m_LongFileName, m_FullNames);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CSessionPropertiesFileNamePage::OnFullnames()
{
m_FullNames = ((CButton *) GetDlgItem(IDC_FULLNAMES)) -> GetCheck();
SetFullNames(m_LongFileName, m_FullNames);
}
void CSessionPropertiesFileNamePage::SetFullNames(int i, BOOL b)
{
i = i + ((b) ? 3 : 0);
CString temp;
temp.LoadString(IDS_NAMING1 + i);
GetDlgItem(IDC_STATIC2) -> SetWindowText(temp);
}
void CSessionPropertiesFileNamePage::On831()
{
m_LongFileName = 0;
SetFullNames(m_LongFileName, m_FullNames);
}
void CSessionPropertiesFileNamePage::On832()
{
m_LongFileName = 1;
SetFullNames(m_LongFileName, m_FullNames);
}
void CSessionPropertiesFileNamePage::On833()
{
m_LongFileName = 2;
SetFullNames(m_LongFileName, m_FullNames);
}