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