Page1.cpp
上传用户:yongqian
上传日期:2007-01-02
资源大小:74k
文件大小:2k
- // Page1.cpp : implementation file
- //
- #include "stdafx.h"
- #include "propinprop.h"
- #include "propertySubSheet1.h"
- #include "Subpage1.h"
- #include "Subpage2.h"
- #include "Subpage3.h"
- #include "Page1.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // Page1 property page
- IMPLEMENT_DYNCREATE(Page1, CPropertyPage)
- Page1::Page1() : CPropertyPage(Page1::IDD)
- {
- //{{AFX_DATA_INIT(Page1)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
- Page1::~Page1()
- {
- if(m_pSubpage1)
- delete m_pSubpage1;
- if(m_pSubpage2)
- delete m_pSubpage2;
- if(m_pSubpage3)
- delete m_pSubpage3;
- if(m_pSubSheet1)
- delete m_pSubSheet1;
- }
- BOOL Page1::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- m_pSubpage1 = new Subpage1;
- m_pSubpage2 = new Subpage2;
- m_pSubpage3 = new Subpage3;
-
- m_pSubSheet1 = new PropertySubSheet1;
- m_pSubSheet1->AddPage(m_pSubpage1);
- m_pSubSheet1->AddPage(m_pSubpage2);
- m_pSubSheet1->AddPage(m_pSubpage3);
-
- m_pSubSheet1->Create(this, WS_CHILD | WS_VISIBLE, 0);
- m_pSubSheet1->ModifyStyleEx (0, WS_EX_CONTROLPARENT);
- m_pSubSheet1->ModifyStyle( 0, WS_TABSTOP );
-
- CRect rcSheet;
-
- GetDlgItem( IDC_PLACEHOLDER1 )->GetWindowRect( &rcSheet );
- ScreenToClient( &rcSheet );
-
- m_pSubSheet1->SetWindowPos( NULL, rcSheet.left-7, rcSheet.top-7, 0,0,
- SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE );
-
- return TRUE;
- }
- void Page1::DoDataExchange(CDataExchange* pDX)
- {
- CPropertyPage::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(Page1)
- // NOTE: the ClassWizard will add DDX and DDV calls here
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(Page1, CPropertyPage)
- //{{AFX_MSG_MAP(Page1)
- // NOTE: the ClassWizard will add message map macros here
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // Page1 message handlers