www.pudn.com > ManyControl.rar > MyPropertyPage1.cpp
// MyPropertyPage1.cpp : implementation file
//
#include "stdafx.h"
#include "resource.h"
#include "MyPropertyPage1.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
IMPLEMENT_DYNCREATE(CMyPropertyPage1, CPropertyPage)
IMPLEMENT_DYNCREATE(CMyPropertyPage2, CPropertyPage)
IMPLEMENT_DYNCREATE(CMyPropertyPage3, CPropertyPage)
IMPLEMENT_DYNCREATE(CMyPropertyPage4, CPropertyPage)
/////////////////////////////////////////////////////////////////////////////
// CMyPropertyPage1 property page
CMyPropertyPage1::CMyPropertyPage1() : CPropertyPage(CMyPropertyPage1::IDD)
{
//{{AFX_DATA_INIT(CMyPropertyPage1)
m_CurrentPath = _T("");
//}}AFX_DATA_INIT
}
CMyPropertyPage1::~CMyPropertyPage1()
{
}
void CMyPropertyPage1::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMyPropertyPage1)
DDX_Control(pDX, IDC_TREE_EXAMPLE, m_Tree);
DDX_Text(pDX, IDC_EDIT_TREE, m_CurrentPath);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CMyPropertyPage1, CPropertyPage)
//{{AFX_MSG_MAP(CMyPropertyPage1)
ON_NOTIFY(TVN_SELCHANGED, IDC_TREE_EXAMPLE, OnSelchangedTreeExample)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMyPropertyPage2 property page
CMyPropertyPage2::CMyPropertyPage2() : CPropertyPage(CMyPropertyPage2::IDD)
{
//{{AFX_DATA_INIT(CMyPropertyPage2)
m_fileSpace = 0;
//}}AFX_DATA_INIT
}
CMyPropertyPage2::~CMyPropertyPage2()
{
}
void CMyPropertyPage2::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMyPropertyPage2)
DDX_Control(pDX, IDC_LIST_EXAMPLE, m_List);
DDX_Text(pDX, IDC_EDIT_LIST, m_fileSpace);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CMyPropertyPage2, CPropertyPage)
//{{AFX_MSG_MAP(CMyPropertyPage2)
ON_NOTIFY(NM_CLICK, IDC_LIST_EXAMPLE, OnClickListExample)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMyPropertyPage3 property page
CMyPropertyPage3::CMyPropertyPage3() : CPropertyPage(CMyPropertyPage3::IDD)
{
//{{AFX_DATA_INIT(CMyPropertyPage3)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
CMyPropertyPage3::~CMyPropertyPage3()
{
}
void CMyPropertyPage3::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMyPropertyPage3)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CMyPropertyPage3, CPropertyPage)
//{{AFX_MSG_MAP(CMyPropertyPage3)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMyPropertyPage4 property page
CMyPropertyPage4::CMyPropertyPage4() : CPropertyPage(CMyPropertyPage4::IDD)
{
//{{AFX_DATA_INIT(CMyPropertyPage4)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
CMyPropertyPage4::~CMyPropertyPage4()
{
}
void CMyPropertyPage4::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMyPropertyPage4)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CMyPropertyPage4, CPropertyPage)
//{{AFX_MSG_MAP(CMyPropertyPage4)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BOOL CMyPropertyPage2::OnInitDialog()
{
CPropertyPage::OnInitDialog();
// TODO: Add extra initialization here
m_List.InsertColumn(0,"文件",LVCFMT_LEFT,80,-1);
m_List.InsertColumn(1,"大小",LVCFMT_LEFT,60,-1);
m_List.InsertColumn(2,"类型",LVCFMT_LEFT,160,-1);
int nItem;
//
nItem=m_List.InsertItem(0,"VC++6.0第一章");
m_List.SetItemText(nItem,1,"1530KB");
m_List.SetItemText(nItem,2,"Microsoft Word 文档");
//
nItem=m_List.InsertItem(1,"filecopy.avi");
m_List.SetItemText(nItem,1,"10KB");
m_List.SetItemText(nItem,2,"电视剪辑");
//
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CMyPropertyPage2::OnClickListExample(NMHDR* pNMHDR, LRESULT* pResult)
{
// TODO: Add your control notification handler code here
/* for(int i=0;i